Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ScaleTransform.cs
- ToolboxItemCollection.cs
- ZipIOExtraFieldElement.cs
- PackageFilter.cs
- UInt32Converter.cs
- Calendar.cs
- TemplateNameScope.cs
- ComboBox.cs
- FormParameter.cs
- HtmlInputSubmit.cs
- _Win32.cs
- CheckBoxBaseAdapter.cs
- InnerItemCollectionView.cs
- HashAlgorithm.cs
- UniqueIdentifierService.cs
- CfgParser.cs
- XmlSchemaException.cs
- Mouse.cs
- KeyNotFoundException.cs
- SqlDataSourceSelectingEventArgs.cs
- XmlSchemaExporter.cs
- DispatcherExceptionEventArgs.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- DocumentationServerProtocol.cs
- DetailsViewPageEventArgs.cs
- ExceptionCollection.cs
- OleDbParameter.cs
- FlowThrottle.cs
- ProtocolElement.cs
- ResourceCategoryAttribute.cs
- ConfigXmlAttribute.cs
- EventProxy.cs
- SoapAttributeAttribute.cs
- SHA256Cng.cs
- OrCondition.cs
- CommonXSendMessage.cs
- EmptyCollection.cs
- FileUpload.cs
- DecimalKeyFrameCollection.cs
- SourceLocationProvider.cs
- Symbol.cs
- Baml2006Reader.cs
- NameValueCollection.cs
- ServiceBusyException.cs
- FullTextState.cs
- ServiceParser.cs
- Dump.cs
- ServerType.cs
- DataGridComponentEditor.cs
- DragSelectionMessageFilter.cs
- DataObject.cs
- LockRenewalTask.cs
- SignatureDescription.cs
- OdbcHandle.cs
- CompressEmulationStream.cs
- Primitive.cs
- QuadraticBezierSegment.cs
- MetricEntry.cs
- DynamicRendererThreadManager.cs
- TouchPoint.cs
- MimeTypeAttribute.cs
- VectorKeyFrameCollection.cs
- PropertyGrid.cs
- VisualStyleInformation.cs
- InteropAutomationProvider.cs
- SqlDataSourceWizardForm.cs
- ColorMatrix.cs
- StatusBarItemAutomationPeer.cs
- PassportAuthentication.cs
- PenContexts.cs
- NumericUpDown.cs
- PackageProperties.cs
- UnsafePeerToPeerMethods.cs
- TreeNodeSelectionProcessor.cs
- WindowsListViewGroup.cs
- LoginStatusDesigner.cs
- HMACSHA1.cs
- PerspectiveCamera.cs
- xdrvalidator.cs
- OutputScope.cs
- WindowHideOrCloseTracker.cs
- SQLSingle.cs
- XslTransform.cs
- CryptoApi.cs
- SwitchAttribute.cs
- TreeViewDataItemAutomationPeer.cs
- ComponentCache.cs
- CollectionTraceRecord.cs
- XmlNamespaceMappingCollection.cs
- ConfigDefinitionUpdates.cs
- ObjectDataSourceView.cs
- LazyLoadBehavior.cs
- LinkClickEvent.cs
- ModelTreeEnumerator.cs
- FlowPosition.cs
- SqlResolver.cs
- Soap.cs
- EntityCommand.cs
- EntityException.cs
- DeclarativeCatalogPart.cs