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
- NetTcpSecurity.cs
- SystemWebExtensionsSectionGroup.cs
- OrthographicCamera.cs
- XmlDataSourceNodeDescriptor.cs
- FlowDocumentScrollViewer.cs
- XmlSchemaObjectTable.cs
- InProcStateClientManager.cs
- Route.cs
- TextTrailingCharacterEllipsis.cs
- MenuItem.cs
- ToolBarButtonClickEvent.cs
- SHA384Cng.cs
- ClientOperation.cs
- GridViewCommandEventArgs.cs
- XmlSubtreeReader.cs
- TransformValueSerializer.cs
- FieldMetadata.cs
- ZoneMembershipCondition.cs
- IisTraceListener.cs
- Accessors.cs
- ImageDesigner.cs
- StorageFunctionMapping.cs
- RegexCapture.cs
- LinkedResourceCollection.cs
- ExpiredSecurityTokenException.cs
- PolyLineSegment.cs
- FileRecordSequence.cs
- DependencyProperty.cs
- TreeChangeInfo.cs
- MarginCollapsingState.cs
- XmlUtilWriter.cs
- ValidationError.cs
- Bitmap.cs
- PerformanceCounterLib.cs
- CompileLiteralTextParser.cs
- XamlTemplateSerializer.cs
- AQNBuilder.cs
- IndexOutOfRangeException.cs
- sqlnorm.cs
- ExpressionPrefixAttribute.cs
- ServicesExceptionNotHandledEventArgs.cs
- DrawingAttributesDefaultValueFactory.cs
- StackBuilderSink.cs
- ScriptingSectionGroup.cs
- NullableDoubleSumAggregationOperator.cs
- TextRangeEdit.cs
- CheckPair.cs
- figurelengthconverter.cs
- OracleRowUpdatedEventArgs.cs
- OletxTransactionFormatter.cs
- DtdParser.cs
- BinaryFormatter.cs
- XmlNotation.cs
- PtsContext.cs
- SubclassTypeValidatorAttribute.cs
- WebServiceEnumData.cs
- SurrogateSelector.cs
- WebDescriptionAttribute.cs
- XmlParserContext.cs
- ToolStripArrowRenderEventArgs.cs
- DataGridViewRowPostPaintEventArgs.cs
- PaintValueEventArgs.cs
- ColumnBinding.cs
- LayoutTableCell.cs
- KeyValuePair.cs
- DynamicContractTypeBuilder.cs
- Baml2006ReaderContext.cs
- MetabaseSettingsIis7.cs
- EntityDataSourceValidationException.cs
- SequentialWorkflowHeaderFooter.cs
- AdRotatorDesigner.cs
- DictionaryContent.cs
- ScrollViewer.cs
- OdbcTransaction.cs
- AccessKeyManager.cs
- XsdValidatingReader.cs
- DataGridLinkButton.cs
- Events.cs
- RawStylusActions.cs
- TextEffectCollection.cs
- DeadCharTextComposition.cs
- ExtentJoinTreeNode.cs
- DefaultExpressionVisitor.cs
- CachedCompositeFamily.cs
- FixedPageAutomationPeer.cs
- FixedTextBuilder.cs
- Grammar.cs
- PrintDocument.cs
- Row.cs
- Attachment.cs
- XmlUtilWriter.cs
- ScriptIgnoreAttribute.cs
- SapiGrammar.cs
- SqlRowUpdatedEvent.cs
- FlowLayoutPanel.cs
- XamlSerializationHelper.cs
- DataColumnMappingCollection.cs
- ClientFormsIdentity.cs
- DrawingContextDrawingContextWalker.cs
- FieldToken.cs