Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / DataRelationPropertyDescriptor.cs / 1305376 / 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
- SystemIPGlobalProperties.cs
- MatchAttribute.cs
- VirtualPathProvider.cs
- ComponentEvent.cs
- QuaternionValueSerializer.cs
- BamlResourceContent.cs
- OdbcConnectionPoolProviderInfo.cs
- CompilationRelaxations.cs
- AutomationElement.cs
- Convert.cs
- BasicViewGenerator.cs
- XpsFilter.cs
- OracleInfoMessageEventArgs.cs
- SoapInteropTypes.cs
- Scheduler.cs
- DiagnosticsElement.cs
- DesignerActionKeyboardBehavior.cs
- BitmapFrameEncode.cs
- FrameworkTextComposition.cs
- PowerStatus.cs
- EditingCommands.cs
- XmlElementList.cs
- SqlXmlStorage.cs
- TemplatePartAttribute.cs
- Mutex.cs
- WebUtil.cs
- SqlUserDefinedTypeAttribute.cs
- EntityDataSourceDataSelection.cs
- ResourceDictionary.cs
- WindowsFormsSynchronizationContext.cs
- ToolStripKeyboardHandlingService.cs
- OracleConnectionFactory.cs
- remotingproxy.cs
- DataGridViewCellStyleEditor.cs
- TimeManager.cs
- DataTableReader.cs
- TypeLibConverter.cs
- GridItemProviderWrapper.cs
- ElementAtQueryOperator.cs
- DefaultAuthorizationContext.cs
- RawStylusInputReport.cs
- DataGridViewColumnCollection.cs
- XmlSchemaSet.cs
- ContextMenuStripActionList.cs
- uribuilder.cs
- DataBindingList.cs
- Separator.cs
- MouseDevice.cs
- CellParaClient.cs
- DelayLoadType.cs
- Metadata.cs
- DesignerDataStoredProcedure.cs
- OdbcDataAdapter.cs
- StylusButton.cs
- CodeDirectoryCompiler.cs
- GacUtil.cs
- PackageRelationshipSelector.cs
- XmlEnumAttribute.cs
- HttpCookieCollection.cs
- MatrixCamera.cs
- VisualTreeUtils.cs
- ThreadAttributes.cs
- WindowsSysHeader.cs
- future.cs
- InvariantComparer.cs
- XmlSchemaAll.cs
- XmlName.cs
- DataObject.cs
- InternalSendMessage.cs
- LinkLabel.cs
- _NetworkingPerfCounters.cs
- PropertyChangedEventManager.cs
- RelationshipEndMember.cs
- DataObjectFieldAttribute.cs
- HandoffBehavior.cs
- UIElementParaClient.cs
- RepeatButton.cs
- PixelFormats.cs
- SerializationObjectManager.cs
- XmlSerializerSection.cs
- HTMLTagNameToTypeMapper.cs
- WorkflowInstance.cs
- HandledMouseEvent.cs
- TrackPointCollection.cs
- CalendarDateRangeChangingEventArgs.cs
- ConfigurationStrings.cs
- WpfXamlType.cs
- RoutingEndpointTrait.cs
- BitmapVisualManager.cs
- SelectorAutomationPeer.cs
- AppDomainEvidenceFactory.cs
- UnsafeNativeMethods.cs
- MutexSecurity.cs
- WindowsGraphicsWrapper.cs
- RoleService.cs
- XmlKeywords.cs
- CommandEventArgs.cs
- ResourceDisplayNameAttribute.cs
- View.cs
- HelpProvider.cs