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
- WebHostedComPlusServiceHost.cs
- XmlSchemaAttributeGroupRef.cs
- SvcMapFileSerializer.cs
- XmlNamedNodeMap.cs
- SspiHelper.cs
- ADConnectionHelper.cs
- TableLayout.cs
- Html32TextWriter.cs
- ErrorWrapper.cs
- DayRenderEvent.cs
- CodeConstructor.cs
- TickBar.cs
- PanelDesigner.cs
- IUnknownConstantAttribute.cs
- ConstraintEnumerator.cs
- MembershipPasswordException.cs
- _HeaderInfo.cs
- CodeNamespaceCollection.cs
- AsymmetricKeyExchangeDeformatter.cs
- ToolStripContentPanel.cs
- TraceSwitch.cs
- Switch.cs
- TraceLog.cs
- XmlNotation.cs
- InkCanvasInnerCanvas.cs
- HideDisabledControlAdapter.cs
- ProjectionCamera.cs
- EndpointConfigContainer.cs
- GridViewSelectEventArgs.cs
- SchemaImporterExtension.cs
- GlyphRunDrawing.cs
- ImageListImage.cs
- ImmutableObjectAttribute.cs
- BoolExpr.cs
- ImageSource.cs
- AssemblyBuilder.cs
- xsdvalidator.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- ControlOperationBehavior.cs
- ValidationErrorCollection.cs
- MinimizableAttributeTypeConverter.cs
- ExportOptions.cs
- ApplicationDirectory.cs
- ImageBrush.cs
- Evidence.cs
- IOThreadTimer.cs
- UnsafeNativeMethods.cs
- ViewBase.cs
- OleDbParameterCollection.cs
- InternalResources.cs
- Size.cs
- DataSourceCache.cs
- RowToParametersTransformer.cs
- DataErrorValidationRule.cs
- SoapServerMethod.cs
- IdentityHolder.cs
- CodeChecksumPragma.cs
- RoutedEvent.cs
- CompoundFileStorageReference.cs
- localization.cs
- DefaultBinder.cs
- ReachVisualSerializer.cs
- TraceUtility.cs
- QueryGenerator.cs
- MappingSource.cs
- MeshGeometry3D.cs
- ProcessManager.cs
- ResourceContainer.cs
- EncryptedPackage.cs
- KeyboardDevice.cs
- LogFlushAsyncResult.cs
- TypeHelper.cs
- Stylesheet.cs
- EdmItemCollection.cs
- NetStream.cs
- Vector3dCollection.cs
- ByteStorage.cs
- ScriptControl.cs
- ModelPropertyDescriptor.cs
- SHA512Managed.cs
- FixedDSBuilder.cs
- DataSourceHelper.cs
- TdsParserSessionPool.cs
- remotingproxy.cs
- SymbolPair.cs
- InternalEnumValidator.cs
- CallbackException.cs
- FunctionDescription.cs
- TaiwanCalendar.cs
- BypassElementCollection.cs
- WebRequestModuleElementCollection.cs
- UIntPtr.cs
- TdsParserSafeHandles.cs
- BitmapEffectOutputConnector.cs
- DataGridViewRowCollection.cs
- InputLanguageSource.cs
- WebPartAuthorizationEventArgs.cs
- XmlAttribute.cs
- TreeViewItem.cs
- ServiceModelStringsVersion1.cs