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
- GenericUriParser.cs
- StylusOverProperty.cs
- mediaeventargs.cs
- ManagementEventWatcher.cs
- GeneratedContractType.cs
- Int32CAMarshaler.cs
- EventWaitHandleSecurity.cs
- _HeaderInfo.cs
- SQLByte.cs
- PersonalizationProvider.cs
- HuffmanTree.cs
- SessionStateModule.cs
- MediaPlayer.cs
- ConfigXmlWhitespace.cs
- IdentitySection.cs
- SafeArrayRankMismatchException.cs
- FilterRepeater.cs
- SchemaNotation.cs
- MethodRental.cs
- SymbolDocumentGenerator.cs
- CheckBoxStandardAdapter.cs
- DataKeyCollection.cs
- DocumentViewerBaseAutomationPeer.cs
- DataGridViewTextBoxCell.cs
- DataControlFieldCell.cs
- SqlFunctionAttribute.cs
- ObjectDisposedException.cs
- MenuItemStyleCollectionEditor.cs
- DbSourceParameterCollection.cs
- UnionExpr.cs
- AdornerLayer.cs
- Int32AnimationUsingKeyFrames.cs
- AnnotationComponentChooser.cs
- ResourceReferenceExpression.cs
- ApplicationServiceHelper.cs
- MachineKeySection.cs
- CodeAssignStatement.cs
- TableItemStyle.cs
- FontFamilyConverter.cs
- HierarchicalDataBoundControlAdapter.cs
- StringValidatorAttribute.cs
- TypeViewSchema.cs
- SqlResolver.cs
- CodeMemberMethod.cs
- ModuleBuilderData.cs
- Point3DAnimationBase.cs
- XmlElementCollection.cs
- GenericIdentity.cs
- _CommandStream.cs
- InputBuffer.cs
- IssuanceLicense.cs
- SchemaElementDecl.cs
- ColorBlend.cs
- ServiceDescriptionReflector.cs
- TextPatternIdentifiers.cs
- EmptyCollection.cs
- UnsafeNativeMethods.cs
- DecimalAnimationBase.cs
- WinFormsSecurity.cs
- DataGridViewElement.cs
- SecurityUniqueId.cs
- TrimSurroundingWhitespaceAttribute.cs
- ResourceDescriptionAttribute.cs
- Serializer.cs
- InteropAutomationProvider.cs
- TraceHandlerErrorFormatter.cs
- SqlInfoMessageEvent.cs
- MetadataItemSerializer.cs
- DataDesignUtil.cs
- MasterPageParser.cs
- WsdlInspector.cs
- SettingsBase.cs
- HandlerFactoryCache.cs
- Image.cs
- RelativeSource.cs
- Size3D.cs
- ParseChildrenAsPropertiesAttribute.cs
- MethodRental.cs
- CalendarKeyboardHelper.cs
- IntSecurity.cs
- ColorConvertedBitmapExtension.cs
- SiteMapProvider.cs
- CheckBoxBaseAdapter.cs
- DiscreteKeyFrames.cs
- ComAwareEventInfo.cs
- CircleHotSpot.cs
- Win32KeyboardDevice.cs
- TextBlock.cs
- HandleExceptionArgs.cs
- DeclaredTypeValidatorAttribute.cs
- ResourceDefaultValueAttribute.cs
- ShapingEngine.cs
- ApplicationManager.cs
- DecimalFormatter.cs
- Compiler.cs
- FlowDocumentFormatter.cs
- DefaultEventAttribute.cs
- WebBrowserUriTypeConverter.cs
- DesignerAutoFormatStyle.cs
- WebServiceClientProxyGenerator.cs