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
- RemoteCryptoTokenProvider.cs
- HttpCachePolicyElement.cs
- StringSorter.cs
- BookmarkInfo.cs
- SvcMapFileSerializer.cs
- XPathNavigatorReader.cs
- RuntimeArgumentHandle.cs
- ThreadNeutralSemaphore.cs
- WriteFileContext.cs
- ServerValidateEventArgs.cs
- TextDecorations.cs
- UnsafeCollabNativeMethods.cs
- ConditionalAttribute.cs
- PreparingEnlistment.cs
- ObjectStateManager.cs
- MultilineStringConverter.cs
- DataContext.cs
- DbConnectionPool.cs
- Opcode.cs
- ManagementOptions.cs
- ElementProxy.cs
- WasAdminWrapper.cs
- DiffuseMaterial.cs
- TrailingSpaceComparer.cs
- XmlAnyAttributeAttribute.cs
- Timer.cs
- QueryHandler.cs
- SoapEnumAttribute.cs
- SinglePageViewer.cs
- PassportAuthenticationModule.cs
- WindowsListViewGroupHelper.cs
- EntityDesignerBuildProvider.cs
- CustomSignedXml.cs
- BindingCompleteEventArgs.cs
- SqlWorkflowInstanceStoreLock.cs
- ButtonFlatAdapter.cs
- FixedPage.cs
- EdmSchemaAttribute.cs
- WebSysDescriptionAttribute.cs
- DataViewSettingCollection.cs
- AffineTransform3D.cs
- ChannelSinkStacks.cs
- TransformCollection.cs
- SqlCacheDependencySection.cs
- BamlTreeNode.cs
- Columns.cs
- MeasurementDCInfo.cs
- SqlFacetAttribute.cs
- NullableIntMinMaxAggregationOperator.cs
- PrintDialog.cs
- NullReferenceException.cs
- ParameterCollection.cs
- IsolatedStorageException.cs
- PrincipalPermission.cs
- IPPacketInformation.cs
- MailSettingsSection.cs
- TextTreeUndo.cs
- LinkLabel.cs
- ToolboxComponentsCreatedEventArgs.cs
- InstanceKeyCompleteException.cs
- X509SecurityTokenParameters.cs
- DomNameTable.cs
- EnumerableCollectionView.cs
- MailDefinition.cs
- CodeTypeDelegate.cs
- HtmlToClrEventProxy.cs
- SQLDateTime.cs
- SqlNotificationRequest.cs
- Visual.cs
- FlowDocumentPaginator.cs
- TopClause.cs
- InfoCardListRequest.cs
- UInt16Converter.cs
- GlyphRunDrawing.cs
- X509Utils.cs
- QueryCursorEventArgs.cs
- CTreeGenerator.cs
- TextSelection.cs
- AuthenticationModulesSection.cs
- NamespaceEmitter.cs
- AuditLevel.cs
- DataTransferEventArgs.cs
- ComponentResourceKeyConverter.cs
- GenericIdentity.cs
- SqlDependencyListener.cs
- CharacterBuffer.cs
- InstanceOwner.cs
- TextRange.cs
- ChameleonKey.cs
- CollectionAdapters.cs
- SurrogateDataContract.cs
- MethodBody.cs
- DifferencingCollection.cs
- MissingMemberException.cs
- NavigationEventArgs.cs
- SqlUDTStorage.cs
- SyncMethodInvoker.cs
- ToolboxSnapDragDropEventArgs.cs
- FlowDocumentScrollViewer.cs
- ListBase.cs