Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / DataRelationPropertyDescriptor.cs / 1305376 / DataRelationPropertyDescriptor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System.ComponentModel; ////// internal sealed class DataRelationPropertyDescriptor : PropertyDescriptor { DataRelation relation; internal DataRelation Relation { get { return relation; } } internal DataRelationPropertyDescriptor(DataRelation dataRelation) : base(dataRelation.RelationName, null) { this.relation = dataRelation; } public override Type ComponentType { get { return typeof(DataRowView); } } public override bool IsReadOnly { get { return false; } } public override Type PropertyType { get { return typeof(IBindingList); } } public override bool Equals(object other) { if (other is DataRelationPropertyDescriptor) { DataRelationPropertyDescriptor descriptor = (DataRelationPropertyDescriptor) other; return(descriptor.Relation == Relation); } return false; } public override Int32 GetHashCode() { return Relation.GetHashCode(); } public override bool CanResetValue(object component) { return false; } public override object GetValue(object component) { DataRowView dataRowView = (DataRowView) component; return dataRowView.CreateChildView(relation); } public override void ResetValue(object component) { } public override void SetValue(object component, object value) { } public override bool ShouldSerializeValue(object component) { return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //[To be supplied.] ///// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System.ComponentModel; ////// internal sealed class DataRelationPropertyDescriptor : PropertyDescriptor { DataRelation relation; internal DataRelation Relation { get { return relation; } } internal DataRelationPropertyDescriptor(DataRelation dataRelation) : base(dataRelation.RelationName, null) { this.relation = dataRelation; } public override Type ComponentType { get { return typeof(DataRowView); } } public override bool IsReadOnly { get { return false; } } public override Type PropertyType { get { return typeof(IBindingList); } } public override bool Equals(object other) { if (other is DataRelationPropertyDescriptor) { DataRelationPropertyDescriptor descriptor = (DataRelationPropertyDescriptor) other; return(descriptor.Relation == Relation); } return false; } public override Int32 GetHashCode() { return Relation.GetHashCode(); } public override bool CanResetValue(object component) { return false; } public override object GetValue(object component) { DataRowView dataRowView = (DataRowView) component; return dataRowView.CreateChildView(relation); } public override void ResetValue(object component) { } public override void SetValue(object component, object value) { } public override bool ShouldSerializeValue(object component) { return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ContentHostHelper.cs
- HandleRef.cs
- AdditionalEntityFunctions.cs
- SendMailErrorEventArgs.cs
- FlowchartDesigner.xaml.cs
- DoubleAnimation.cs
- TreeNodeConverter.cs
- QueryExpr.cs
- Pen.cs
- SessionEndingCancelEventArgs.cs
- SQLInt64Storage.cs
- PropertyEntry.cs
- IIS7UserPrincipal.cs
- MulticastDelegate.cs
- DataRelation.cs
- ParallelTimeline.cs
- WindowClosedEventArgs.cs
- ColumnCollection.cs
- DataBinding.cs
- BeginStoryboard.cs
- MethodBuilderInstantiation.cs
- SByte.cs
- CaseInsensitiveHashCodeProvider.cs
- SHA384CryptoServiceProvider.cs
- RequiredAttributeAttribute.cs
- SerializableAttribute.cs
- TabPage.cs
- ByteStreamMessage.cs
- DataRow.cs
- DispatchChannelSink.cs
- ContextMarshalException.cs
- WSTrust.cs
- Configuration.cs
- UserNamePasswordClientCredential.cs
- ServicesUtilities.cs
- Path.cs
- StretchValidation.cs
- SafeRightsManagementQueryHandle.cs
- WebPartsPersonalizationAuthorization.cs
- HebrewNumber.cs
- RootBrowserWindowAutomationPeer.cs
- IntSecurity.cs
- XmlEntity.cs
- SmtpReplyReaderFactory.cs
- BitmapEffect.cs
- FormViewInsertedEventArgs.cs
- TextBox.cs
- HtmlLinkAdapter.cs
- CheckBoxFlatAdapter.cs
- DataGridViewCell.cs
- HtmlInputButton.cs
- MainMenu.cs
- EditorZone.cs
- AudioStateChangedEventArgs.cs
- GeneratedCodeAttribute.cs
- ToolStripOverflowButton.cs
- AlgoModule.cs
- RolePrincipal.cs
- WindowsListViewItem.cs
- SupportsEventValidationAttribute.cs
- UnSafeCharBuffer.cs
- Sql8ConformanceChecker.cs
- UshortList2.cs
- DiscoveryReference.cs
- HttpCapabilitiesEvaluator.cs
- Token.cs
- XPathAncestorIterator.cs
- SQLResource.cs
- Label.cs
- TaiwanLunisolarCalendar.cs
- ConfigurationProperty.cs
- IdentityHolder.cs
- updatecommandorderer.cs
- TextBoxDesigner.cs
- OLEDB_Enum.cs
- OledbConnectionStringbuilder.cs
- XmlSerializerSection.cs
- DbParameterCollectionHelper.cs
- Authorization.cs
- MarkerProperties.cs
- TypeToken.cs
- SecurityResources.cs
- HtmlMeta.cs
- NamespaceInfo.cs
- TextServicesHost.cs
- ShaderRenderModeValidation.cs
- ValidatedControlConverter.cs
- FixUp.cs
- LongMinMaxAggregationOperator.cs
- StrokeCollectionDefaultValueFactory.cs
- DesignTimeXamlWriter.cs
- TextSpanModifier.cs
- ActivityInfo.cs
- InputScopeNameConverter.cs
- Rotation3DAnimationBase.cs
- DivideByZeroException.cs
- PerspectiveCamera.cs
- ViewCellRelation.cs
- RegisteredScript.cs
- InvalidOperationException.cs