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;
///
/// [To be supplied.]
///
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.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
// [....]
// [....]
//-----------------------------------------------------------------------------
namespace System.Data {
using System.ComponentModel;
///
/// [To be supplied.]
///
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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StreamGeometry.cs
- PositiveTimeSpanValidator.cs
- Query.cs
- ListenerElementsCollection.cs
- StateManagedCollection.cs
- RsaSecurityTokenAuthenticator.cs
- ContentDisposition.cs
- MethodCallConverter.cs
- XmlDataCollection.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- GeneralTransformGroup.cs
- OdbcError.cs
- CompileXomlTask.cs
- WorkflowApplicationIdleEventArgs.cs
- ModifierKeysValueSerializer.cs
- WriteFileContext.cs
- IntSecurity.cs
- InfoCardAsymmetricCrypto.cs
- MouseButtonEventArgs.cs
- TransportSecurityHelpers.cs
- ArgumentNullException.cs
- XmlArrayItemAttribute.cs
- AnimationClockResource.cs
- AutomationPropertyInfo.cs
- Pair.cs
- WorkflowMarkupSerializationProvider.cs
- CommandHelper.cs
- WS2007HttpBindingCollectionElement.cs
- DataGridViewRowEventArgs.cs
- Interlocked.cs
- MenuItem.cs
- WebPartConnectionsConfigureVerb.cs
- InfocardClientCredentials.cs
- LayoutManager.cs
- ManifestResourceInfo.cs
- ChunkedMemoryStream.cs
- DbParameterHelper.cs
- ChangesetResponse.cs
- AlignmentXValidation.cs
- HashCoreRequest.cs
- RootDesignerSerializerAttribute.cs
- WeakEventManager.cs
- XamlFigureLengthSerializer.cs
- CompressedStack.cs
- WebPartEditorApplyVerb.cs
- OleDbReferenceCollection.cs
- TypeConverterHelper.cs
- ColumnHeader.cs
- _NegoState.cs
- AutomationPeer.cs
- TextEffect.cs
- HttpRuntimeSection.cs
- DictionarySectionHandler.cs
- DataGridViewRowPostPaintEventArgs.cs
- XmlMembersMapping.cs
- DecoderExceptionFallback.cs
- BitmapEffectState.cs
- Message.cs
- InvalidCastException.cs
- TakeQueryOptionExpression.cs
- _AcceptOverlappedAsyncResult.cs
- WindowsIdentity.cs
- _Rfc2616CacheValidators.cs
- DbQueryCommandTree.cs
- GetReadStreamResult.cs
- ImageSourceValueSerializer.cs
- PropertyDescriptorCollection.cs
- ScriptControlManager.cs
- UrlPropertyAttribute.cs
- CodeGen.cs
- MenuAdapter.cs
- AttachmentCollection.cs
- CachedBitmap.cs
- MSG.cs
- RegexWorker.cs
- XpsResourceDictionary.cs
- XmlSchemaType.cs
- KeyboardNavigation.cs
- StrokeRenderer.cs
- parserscommon.cs
- LoginUtil.cs
- MediaContextNotificationWindow.cs
- DataGrid.cs
- _LocalDataStore.cs
- XsltOutput.cs
- AuthenticodeSignatureInformation.cs
- ObjectMemberMapping.cs
- CodeCompiler.cs
- OleStrCAMarshaler.cs
- GeometryModel3D.cs
- VirtualPath.cs
- _NegotiateClient.cs
- ZipArchive.cs
- AccessDataSourceView.cs
- ListComponentEditor.cs
- ObjectStateFormatter.cs
- Console.cs
- DeclaredTypeElement.cs
- _Connection.cs
- EffectiveValueEntry.cs