Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Data / System / Data / DataRelationPropertyDescriptor.cs / 1 / 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
- ADMembershipProvider.cs
- DefinitionUpdate.cs
- Pointer.cs
- Executor.cs
- CompatibleComparer.cs
- PaperSize.cs
- OrderByQueryOptionExpression.cs
- StylusTip.cs
- StyleBamlRecordReader.cs
- NativeMethodsCLR.cs
- LinkArea.cs
- GPStream.cs
- SyndicationDeserializer.cs
- CheckBoxPopupAdapter.cs
- ReadOnlyObservableCollection.cs
- ItemsChangedEventArgs.cs
- RecordManager.cs
- StringSource.cs
- ConfigXmlElement.cs
- BoundsDrawingContextWalker.cs
- ClientSettingsSection.cs
- FrameworkContentElementAutomationPeer.cs
- EdmComplexPropertyAttribute.cs
- CustomLineCap.cs
- UnauthorizedAccessException.cs
- CodeCastExpression.cs
- PersonalizationAdministration.cs
- SystemPens.cs
- MetadataArtifactLoaderCompositeResource.cs
- TextEffect.cs
- PrimitiveDataContract.cs
- OptimalBreakSession.cs
- MediaPlayerState.cs
- XPathDescendantIterator.cs
- RadioButtonAutomationPeer.cs
- ConnectionProviderAttribute.cs
- SerializationStore.cs
- COMException.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- Int32Rect.cs
- InputEventArgs.cs
- Accessors.cs
- InstanceDataCollection.cs
- ClassicBorderDecorator.cs
- CompoundFileReference.cs
- DbMetaDataColumnNames.cs
- InkCanvasSelection.cs
- Mutex.cs
- PolyBezierSegment.cs
- PlacementWorkspace.cs
- TreeViewAutomationPeer.cs
- XamlBrushSerializer.cs
- SignatureHelper.cs
- UseAttributeSetsAction.cs
- ListBase.cs
- webbrowsersite.cs
- WebDescriptionAttribute.cs
- ColorConverter.cs
- SecurityToken.cs
- MappedMetaModel.cs
- UInt32.cs
- AppDomain.cs
- StandardBindingElementCollection.cs
- CopyOfAction.cs
- panel.cs
- WebPartDisplayModeEventArgs.cs
- CollectionChange.cs
- WebPartZoneAutoFormat.cs
- ApplicationFileCodeDomTreeGenerator.cs
- KnownTypeHelper.cs
- OdbcInfoMessageEvent.cs
- UnsafeNativeMethods.cs
- MutexSecurity.cs
- ScalarConstant.cs
- RootBrowserWindow.cs
- TableAdapterManagerHelper.cs
- FixedSOMTable.cs
- EdgeModeValidation.cs
- PeerObject.cs
- Environment.cs
- PrivilegedConfigurationManager.cs
- NeutralResourcesLanguageAttribute.cs
- DataRecordInternal.cs
- QuinticEase.cs
- XmlQualifiedName.cs
- WebPartCollection.cs
- ColumnMap.cs
- PropertyIdentifier.cs
- MouseOverProperty.cs
- RelationshipEndCollection.cs
- RuleConditionDialog.cs
- TimersDescriptionAttribute.cs
- DivideByZeroException.cs
- Stack.cs
- InstanceView.cs
- DataSetFieldSchema.cs
- AutoGeneratedField.cs
- ImageDesigner.cs
- DataFormats.cs
- BulletDecorator.cs