Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- AnnotationHelper.cs
- ConditionChanges.cs
- ToolStripItemRenderEventArgs.cs
- PackWebRequestFactory.cs
- CommandEventArgs.cs
- Compiler.cs
- ThrowHelper.cs
- AuthenticationModuleElement.cs
- BufferBuilder.cs
- Pen.cs
- ArrayWithOffset.cs
- MessageBox.cs
- FormattedTextSymbols.cs
- ImplicitInputBrush.cs
- XmlBinaryReaderSession.cs
- SQLGuidStorage.cs
- ExpressionUtilities.cs
- SAPICategories.cs
- ModuleBuilderData.cs
- SourceFileBuildProvider.cs
- HttpHeaderCollection.cs
- SecurityTokenProvider.cs
- ResourceReferenceKeyNotFoundException.cs
- SectionVisual.cs
- SqlCacheDependencySection.cs
- ScriptIgnoreAttribute.cs
- Profiler.cs
- XslUrlEditor.cs
- CustomValidator.cs
- MimeXmlReflector.cs
- NativeMethods.cs
- ConfigViewGenerator.cs
- PathFigureCollectionConverter.cs
- Separator.cs
- Style.cs
- LocalizabilityAttribute.cs
- PtsHost.cs
- Operand.cs
- SiteMapDataSource.cs
- _FtpControlStream.cs
- TableStyle.cs
- RectAnimationBase.cs
- Annotation.cs
- MemoryMappedViewAccessor.cs
- SqlDataSourceTableQuery.cs
- BrowserInteropHelper.cs
- TabItemWrapperAutomationPeer.cs
- XmlHierarchicalEnumerable.cs
- ListenerSessionConnectionReader.cs
- DeriveBytes.cs
- coordinator.cs
- CancelEventArgs.cs
- SiteMapNodeItem.cs
- XmlImplementation.cs
- ChooseAction.cs
- XmlDataCollection.cs
- PriorityBinding.cs
- ImageInfo.cs
- xml.cs
- CLSCompliantAttribute.cs
- SmiEventSink_DeferedProcessing.cs
- BoundField.cs
- Buffer.cs
- PreviewControlDesigner.cs
- SecurityManager.cs
- VerticalConnector.xaml.cs
- FixedSOMLineCollection.cs
- Variant.cs
- FixedSOMGroup.cs
- TokenBasedSet.cs
- EventRouteFactory.cs
- PageWrapper.cs
- Comparer.cs
- Separator.cs
- _TimerThread.cs
- SQLBinaryStorage.cs
- DataSourceHelper.cs
- SmtpAuthenticationManager.cs
- SafeFileMapViewHandle.cs
- XmlWrappingWriter.cs
- UnderstoodHeaders.cs
- GuidelineCollection.cs
- ArgIterator.cs
- Point3DCollectionConverter.cs
- HttpListenerPrefixCollection.cs
- ClientTargetCollection.cs
- GeometryGroup.cs
- TraceHandler.cs
- Decoder.cs
- ForwardPositionQuery.cs
- XmlSchemaNotation.cs
- TextSelectionHelper.cs
- RadialGradientBrush.cs
- ProviderIncompatibleException.cs
- HostSecurityManager.cs
- ToolboxCategoryItems.cs
- objectquery_tresulttype.cs
- CodeObject.cs
- SqlInternalConnection.cs
- WindowsComboBox.cs