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
- JoinElimination.cs
- ListDataBindEventArgs.cs
- LineMetrics.cs
- OdbcStatementHandle.cs
- XmlReflectionImporter.cs
- Win32.cs
- EventLogger.cs
- CombinedGeometry.cs
- Page.cs
- WebPartEditorApplyVerb.cs
- Internal.cs
- EdmProperty.cs
- NotFiniteNumberException.cs
- DiscoveryOperationContextExtension.cs
- SerialReceived.cs
- SecurityTokenRequirement.cs
- AliasGenerator.cs
- SqlConnectionHelper.cs
- TrackingQuery.cs
- PowerStatus.cs
- SafeNativeMethods.cs
- TypeToStringValueConverter.cs
- PenContext.cs
- WebPartDisplayModeEventArgs.cs
- IRCollection.cs
- RegexReplacement.cs
- BitArray.cs
- GiveFeedbackEvent.cs
- RequestQueue.cs
- ButtonStandardAdapter.cs
- UnicodeEncoding.cs
- TriggerBase.cs
- DuplicateWaitObjectException.cs
- SHA1.cs
- BindingWorker.cs
- SoapBinding.cs
- PeerEndPoint.cs
- WebPartManager.cs
- GetTokenRequest.cs
- ObjectKeyFrameCollection.cs
- UnsafeNativeMethods.cs
- ButtonField.cs
- UIAgentAsyncBeginRequest.cs
- XmlDomTextWriter.cs
- InkCanvasSelectionAdorner.cs
- SiteMapDataSource.cs
- LinearQuaternionKeyFrame.cs
- Baml2006ReaderFrame.cs
- IndicFontClient.cs
- LinkConverter.cs
- WebBrowserBase.cs
- RSAPKCS1SignatureFormatter.cs
- AssemblyContextControlItem.cs
- MobileRedirect.cs
- RequestResponse.cs
- ValueTypeFixupInfo.cs
- BinaryMethodMessage.cs
- ErrorRuntimeConfig.cs
- DbInsertCommandTree.cs
- NamedPermissionSet.cs
- ConstraintConverter.cs
- SignerInfo.cs
- TileBrush.cs
- _DigestClient.cs
- ObjectStateEntry.cs
- GenericRootAutomationPeer.cs
- CompiledQueryCacheEntry.cs
- EndEvent.cs
- XmlSchemaSimpleTypeUnion.cs
- TextEncodedRawTextWriter.cs
- TabItemAutomationPeer.cs
- PersonalizableAttribute.cs
- WhitespaceRuleReader.cs
- AutoFocusStyle.xaml.cs
- PageAdapter.cs
- SqlRowUpdatingEvent.cs
- SqlCommandAsyncResult.cs
- XmlNamespaceDeclarationsAttribute.cs
- HasRunnableWorkflowEvent.cs
- ToolStripOverflow.cs
- SimpleTypeResolver.cs
- TextTreePropertyUndoUnit.cs
- ActiveDocumentEvent.cs
- SkewTransform.cs
- XPathDocument.cs
- SessionEndedEventArgs.cs
- ObjectQueryState.cs
- HtmlUtf8RawTextWriter.cs
- Pkcs7Recipient.cs
- ToolStripPanelDesigner.cs
- Visual.cs
- HandoffBehavior.cs
- X509Utils.cs
- SynchronizationLockException.cs
- Int32Rect.cs
- GridViewColumnHeaderAutomationPeer.cs
- SqlDataSourceFilteringEventArgs.cs
- DataColumnPropertyDescriptor.cs
- EventProviderWriter.cs
- XmlIterators.cs