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
- AssemblyName.cs
- RIPEMD160Managed.cs
- CellTreeNodeVisitors.cs
- FormViewDesigner.cs
- CodePageEncoding.cs
- TextParentUndoUnit.cs
- CustomAttributeFormatException.cs
- ConfigXmlComment.cs
- OfTypeExpression.cs
- FontUnit.cs
- EdmError.cs
- CellQuery.cs
- DrawingState.cs
- RowType.cs
- UTF8Encoding.cs
- HtmlTableRow.cs
- WebPageTraceListener.cs
- DesignerActionListCollection.cs
- DataGridPagerStyle.cs
- SizeIndependentAnimationStorage.cs
- InternalCache.cs
- RowSpanVector.cs
- Dictionary.cs
- XPathParser.cs
- CornerRadiusConverter.cs
- WindowsUserNameCachingSecurityTokenAuthenticator.cs
- ModelItemImpl.cs
- Rect3DValueSerializer.cs
- WebPartConnectionsCancelEventArgs.cs
- ZoomPercentageConverter.cs
- DataGridViewCellStyleChangedEventArgs.cs
- RegionData.cs
- DictionaryEntry.cs
- DataServiceEntityAttribute.cs
- MachineKeyConverter.cs
- StringComparer.cs
- _ProxyChain.cs
- Message.cs
- XmlSchemaType.cs
- BamlRecords.cs
- StyleXamlParser.cs
- MatrixAnimationUsingPath.cs
- ProcessHostServerConfig.cs
- SqlTransaction.cs
- ReflectionUtil.cs
- AQNBuilder.cs
- StructuredType.cs
- XmlNodeList.cs
- ComponentDispatcherThread.cs
- GenericArgumentsUpdater.cs
- TraceUtility.cs
- TimeoutException.cs
- XMLDiffLoader.cs
- ResourceContainer.cs
- FixedTextBuilder.cs
- AppDomainUnloadedException.cs
- GroupBox.cs
- HiddenFieldDesigner.cs
- BaseDataList.cs
- DesignObjectWrapper.cs
- PersonalizationDictionary.cs
- AnnotationComponentChooser.cs
- WindowsSpinner.cs
- streamingZipPartStream.cs
- EntityParameterCollection.cs
- ValidationRuleCollection.cs
- EntityContainerRelationshipSet.cs
- Pkcs7Recipient.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- TableHeaderCell.cs
- DuplicateDetector.cs
- AutoGeneratedField.cs
- EntityWrapper.cs
- TraceUtils.cs
- XmlSchemaGroupRef.cs
- TreeNodeCollection.cs
- XmlTextAttribute.cs
- SemaphoreSecurity.cs
- ObjectSecurity.cs
- BuildProviderAppliesToAttribute.cs
- MatrixConverter.cs
- StateMachineExecutionState.cs
- GridProviderWrapper.cs
- UpDownBase.cs
- Buffer.cs
- GridViewUpdateEventArgs.cs
- ToolStripManager.cs
- XamlHostingConfiguration.cs
- SocketException.cs
- SatelliteContractVersionAttribute.cs
- Vars.cs
- ObjectNavigationPropertyMapping.cs
- _ContextAwareResult.cs
- RowParagraph.cs
- ClassImporter.cs
- XmlMapping.cs
- Stack.cs
- WeakReferenceList.cs
- ContextStaticAttribute.cs
- VirtualPathProvider.cs