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
- log.cs
- HttpCacheParams.cs
- ExternalCalls.cs
- DataGridViewImageCell.cs
- ImageListStreamer.cs
- XmlException.cs
- WorkflowInlining.cs
- XmlSignatureProperties.cs
- CompilerHelpers.cs
- BitmapSource.cs
- DataGridViewMethods.cs
- ContextQuery.cs
- BasicCellRelation.cs
- COMException.cs
- CellLabel.cs
- TimeSpanConverter.cs
- ImageIndexEditor.cs
- ToolboxBitmapAttribute.cs
- NativeMethods.cs
- ObjectQuery.cs
- XmlSchemaCompilationSettings.cs
- CharKeyFrameCollection.cs
- DataObjectMethodAttribute.cs
- BaseDataListComponentEditor.cs
- WindowsMenu.cs
- WebPartZoneCollection.cs
- BaseTemplateCodeDomTreeGenerator.cs
- TreeNode.cs
- ArglessEventHandlerProxy.cs
- SettingsPropertyNotFoundException.cs
- EntityTypeEmitter.cs
- Walker.cs
- PerfCounterSection.cs
- SystemSounds.cs
- EventLogEntry.cs
- dataSvcMapFileLoader.cs
- RIPEMD160Managed.cs
- Matrix3D.cs
- PropertyItem.cs
- Convert.cs
- DisplayClaim.cs
- Constraint.cs
- PrincipalPermission.cs
- _KerberosClient.cs
- ComponentConverter.cs
- TextServicesCompartment.cs
- NativeMethods.cs
- SessionSwitchEventArgs.cs
- ReflectionPermission.cs
- HtmlGenericControl.cs
- XPathEmptyIterator.cs
- ExpressionBuilder.cs
- ComplexObject.cs
- wmiprovider.cs
- HttpModuleAction.cs
- Rijndael.cs
- XslVisitor.cs
- FileDialog_Vista.cs
- PerfService.cs
- PaintEvent.cs
- FormViewDeletedEventArgs.cs
- ProcessModuleCollection.cs
- ObservableCollection.cs
- MarshalByValueComponent.cs
- TextServicesDisplayAttribute.cs
- CollectionChangeEventArgs.cs
- CustomTypeDescriptor.cs
- AlphabetConverter.cs
- CallTemplateAction.cs
- XmlElementAttribute.cs
- LowerCaseStringConverter.cs
- Stack.cs
- WebHttpDispatchOperationSelector.cs
- RelatedView.cs
- EntityConnection.cs
- NextPreviousPagerField.cs
- BitmapEffectGeneralTransform.cs
- TdsParameterSetter.cs
- QualifiedId.cs
- ProviderException.cs
- Attributes.cs
- QilChoice.cs
- XmlAttributeHolder.cs
- InkSerializer.cs
- HttpWriter.cs
- SQLDateTimeStorage.cs
- SqlDataSourceConfigureSortForm.cs
- MarshalByValueComponent.cs
- SchemaCollectionPreprocessor.cs
- TextAutomationPeer.cs
- Point3DKeyFrameCollection.cs
- ListViewAutomationPeer.cs
- ItemContainerProviderWrapper.cs
- TypeHelpers.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- AssertSection.cs
- XmlUtf8RawTextWriter.cs
- HttpException.cs
- MenuItem.cs
- AtlasWeb.Designer.cs