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
- MimeReturn.cs
- SettingsPropertyCollection.cs
- TypeBuilderInstantiation.cs
- RequiredAttributeAttribute.cs
- WebPartCancelEventArgs.cs
- BackgroundFormatInfo.cs
- DynamicQueryableWrapper.cs
- DataError.cs
- QueryCacheManager.cs
- MarshalByRefObject.cs
- DefaultValidator.cs
- BasicCommandTreeVisitor.cs
- Win32KeyboardDevice.cs
- DefaultObjectMappingItemCollection.cs
- AlternateViewCollection.cs
- CompilerScopeManager.cs
- DeviceContexts.cs
- Pens.cs
- AutomationPropertyInfo.cs
- OleAutBinder.cs
- GenericTypeParameterBuilder.cs
- TextBoxBase.cs
- GroupItem.cs
- HwndSource.cs
- SubpageParagraph.cs
- ResolveDuplexCD1AsyncResult.cs
- PasswordTextNavigator.cs
- TlsnegoTokenAuthenticator.cs
- FigureParagraph.cs
- InternalEnumValidator.cs
- CellTreeNodeVisitors.cs
- ConfigXmlCDataSection.cs
- XmlSchemaSet.cs
- CollectionViewGroup.cs
- TextServicesDisplayAttributePropertyRanges.cs
- JpegBitmapDecoder.cs
- StringAnimationBase.cs
- PathParser.cs
- HostingEnvironmentWrapper.cs
- PlaceHolder.cs
- LastQueryOperator.cs
- SpellCheck.cs
- ButtonColumn.cs
- TextSpanModifier.cs
- SudsParser.cs
- GACMembershipCondition.cs
- _StreamFramer.cs
- AddInBase.cs
- GC.cs
- PrePrepareMethodAttribute.cs
- ServicePoint.cs
- AVElementHelper.cs
- externdll.cs
- Condition.cs
- PersistenceMetadataNamespace.cs
- LinqDataSourceView.cs
- PbrsForward.cs
- WrappingXamlSchemaContext.cs
- CallbackDebugBehavior.cs
- BinaryConverter.cs
- MasterPageCodeDomTreeGenerator.cs
- _WinHttpWebProxyDataBuilder.cs
- DefaultIfEmptyQueryOperator.cs
- CqlLexerHelpers.cs
- DesignerDataSourceView.cs
- ConfigUtil.cs
- SQLCharsStorage.cs
- XmlSchemaIdentityConstraint.cs
- Merger.cs
- SystemIPInterfaceProperties.cs
- PerspectiveCamera.cs
- TickBar.cs
- PointAnimationUsingPath.cs
- AssemblyResourceLoader.cs
- PropertyStore.cs
- GridPattern.cs
- XPathArrayIterator.cs
- EntityException.cs
- GlobalAllocSafeHandle.cs
- XmlEventCache.cs
- DataTemplateSelector.cs
- NetworkAddressChange.cs
- ExceptionUtil.cs
- FlowLayoutPanel.cs
- UpdateTracker.cs
- DataGridViewComponentPropertyGridSite.cs
- WorkflowApplicationEventArgs.cs
- FontConverter.cs
- ServerValidateEventArgs.cs
- FunctionGenerator.cs
- FileInfo.cs
- BaseComponentEditor.cs
- PriorityQueue.cs
- XsltOutput.cs
- Positioning.cs
- WebPartManagerDesigner.cs
- LookupNode.cs
- ChangeBlockUndoRecord.cs
- LongTypeConverter.cs
- IntersectQueryOperator.cs