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
- TemplateParser.cs
- SystemColors.cs
- SatelliteContractVersionAttribute.cs
- CodeIterationStatement.cs
- FieldAccessException.cs
- Size3DValueSerializer.cs
- EntityKeyElement.cs
- ListViewSortEventArgs.cs
- PageThemeParser.cs
- SubtreeProcessor.cs
- Vector3DCollectionValueSerializer.cs
- SimpleFieldTemplateUserControl.cs
- DataBoundControlParameterTarget.cs
- OrderByQueryOptionExpression.cs
- SequentialUshortCollection.cs
- SimpleApplicationHost.cs
- ScrollItemPatternIdentifiers.cs
- ChtmlLinkAdapter.cs
- PolicyLevel.cs
- HandleRef.cs
- BorderGapMaskConverter.cs
- PointLight.cs
- SQLByteStorage.cs
- OutputCacheSettingsSection.cs
- DrawingDrawingContext.cs
- LocalValueEnumerator.cs
- ResponseStream.cs
- ReadOnlyHierarchicalDataSource.cs
- DBCommandBuilder.cs
- ReferencedCollectionType.cs
- EvidenceTypeDescriptor.cs
- OleDbDataReader.cs
- SkinBuilder.cs
- MenuCommand.cs
- DataGrid.cs
- ConfigXmlText.cs
- SQLDecimalStorage.cs
- OleDbInfoMessageEvent.cs
- LingerOption.cs
- JoinSymbol.cs
- WindowsClientCredential.cs
- DataGridViewComboBoxColumn.cs
- PersonalizationDictionary.cs
- AssemblyBuilderData.cs
- WindowsRebar.cs
- WebBrowserUriTypeConverter.cs
- TextTreeFixupNode.cs
- UnaryExpression.cs
- ReadWriteObjectLock.cs
- AuthorizationRuleCollection.cs
- PathData.cs
- RawKeyboardInputReport.cs
- FontFamilyIdentifier.cs
- FormsAuthenticationConfiguration.cs
- ColumnMapTranslator.cs
- linebase.cs
- AutomationPattern.cs
- WebPartTransformerCollection.cs
- SmtpAuthenticationManager.cs
- DataObjectAttribute.cs
- ResourceReferenceExpression.cs
- SoapIgnoreAttribute.cs
- ToolStripPanelRenderEventArgs.cs
- XmlWrappingReader.cs
- RequestResponse.cs
- FontSource.cs
- DrawingAttributes.cs
- HyperlinkAutomationPeer.cs
- UIElementParagraph.cs
- WorkflowMarkupSerializationException.cs
- WebPartConnectionsCloseVerb.cs
- TextEffectCollection.cs
- XamlSerializerUtil.cs
- ClientEndpointLoader.cs
- WS2007HttpBinding.cs
- Tokenizer.cs
- TrackingQuery.cs
- ParamArrayAttribute.cs
- TextSpan.cs
- AudioFileOut.cs
- TableCellAutomationPeer.cs
- SymDocumentType.cs
- StringArrayConverter.cs
- SafeNativeMethodsOther.cs
- OleDbEnumerator.cs
- OleDbParameterCollection.cs
- HandlerFactoryCache.cs
- DesignerRegionCollection.cs
- StatusBarItem.cs
- CriticalFinalizerObject.cs
- EpmSourceTree.cs
- JapaneseLunisolarCalendar.cs
- RuntimeArgumentHandle.cs
- ServicePerformanceCounters.cs
- XmlSchemaSimpleTypeRestriction.cs
- AuthorizationContext.cs
- GridView.cs
- CharacterMetrics.cs
- ContentControl.cs
- TextTreeDeleteContentUndoUnit.cs