Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Base / System / Windows / Markup / ContentWrapperAttribute.cs / 1 / ContentWrapperAttribute.cs
//----------------------------------------------------------------------------
//
// Microsoft Windows Client Platform
// Copyright (C) Microsoft Corporation, 2005
//
// File: ContentWrapperAttribute.cs
//
// Description: Can be specified on a collection type to indicate which
// types are used to wrap content foreign content such as
// strings in a strongly type Collection.
//
// Created: 06/07/2005 chuckj
//
//---------------------------------------------------------------------------
namespace System.Windows.Markup
{
using System;
///
/// Can be specified on a collection type to indicate which
/// types are used to wrap content foreign content such as
/// strings in a strongly type Collection.
///
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
sealed public class ContentWrapperAttribute : Attribute
{
///
/// Declares the given type as being a content wrapper for the collection
/// type this attribute is declared on.
///
///
public ContentWrapperAttribute(Type contentWrapper)
{
_contentWrapper = contentWrapper;
}
///
/// The type that is declared as a content wrapper for the collection type
/// this attribute is declared on.
///
public Type ContentWrapper
{
get { return _contentWrapper; }
}
///
/// Override to ensure AttributeCollection perserves all instances
///
public override object TypeId
{
get { return this; }
}
///
/// Overrides Object.Equals to implement correct equality semantics for this
/// attribute.
///
public override bool Equals(object obj)
{
ContentWrapperAttribute other = obj as ContentWrapperAttribute;
if (other == null) return false;
return _contentWrapper == other._contentWrapper;
}
///
/// Overrides Object.GetHashCode to implement correct hashing semantics.
///
public override int GetHashCode()
{
return _contentWrapper.GetHashCode();
}
private Type _contentWrapper;
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LinkedList.cs
- SoapHeaderException.cs
- _KerberosClient.cs
- OleAutBinder.cs
- InternalConfigRoot.cs
- AssociationTypeEmitter.cs
- DataRowView.cs
- Graph.cs
- SoapMessage.cs
- DataQuery.cs
- ContainerActivationHelper.cs
- Window.cs
- SystemUnicastIPAddressInformation.cs
- TypeBuilderInstantiation.cs
- BaseProcessor.cs
- PenThreadPool.cs
- WebPartConnection.cs
- TargetConverter.cs
- ExtendedProtectionPolicy.cs
- objectquery_tresulttype.cs
- SerializationAttributes.cs
- Soap.cs
- ListArgumentProvider.cs
- ArrangedElement.cs
- ProtectedProviderSettings.cs
- DictionaryContent.cs
- ListViewAutomationPeer.cs
- AxisAngleRotation3D.cs
- IPEndPoint.cs
- EntityContainerAssociationSet.cs
- BinaryCommonClasses.cs
- ControlBuilder.cs
- WinFormsComponentEditor.cs
- DataServiceQueryProvider.cs
- DescriptionAttribute.cs
- SourceFileInfo.cs
- XmlWellformedWriter.cs
- RadioButtonRenderer.cs
- BitmapImage.cs
- SourceLocation.cs
- SqlStatistics.cs
- BaseConfigurationRecord.cs
- SafeEventLogReadHandle.cs
- ByteStreamGeometryContext.cs
- QilFactory.cs
- SerialPort.cs
- RouteItem.cs
- ExpressionPrefixAttribute.cs
- Utils.cs
- ProfileEventArgs.cs
- ListControlBuilder.cs
- SecUtil.cs
- ConfigXmlReader.cs
- MultiSelector.cs
- StylusOverProperty.cs
- SelectorAutomationPeer.cs
- SamlConstants.cs
- PageThemeParser.cs
- InteropEnvironment.cs
- FileNotFoundException.cs
- Vector3dCollection.cs
- MimePart.cs
- ReaderContextStackData.cs
- LineSegment.cs
- BaseHashHelper.cs
- StateItem.cs
- OleDbStruct.cs
- TextTreeTextElementNode.cs
- ElementFactory.cs
- StructuredTypeEmitter.cs
- HttpChannelBindingToken.cs
- HandleRef.cs
- TextParagraphView.cs
- UriWriter.cs
- TextTreeInsertElementUndoUnit.cs
- Schema.cs
- HttpCacheParams.cs
- FeatureSupport.cs
- ResourceManagerWrapper.cs
- ClientRuntimeConfig.cs
- Registration.cs
- HandlerWithFactory.cs
- NativeMethods.cs
- EntityTypeEmitter.cs
- LayoutEngine.cs
- StreamingContext.cs
- TextViewSelectionProcessor.cs
- PerformanceCounterPermissionEntryCollection.cs
- ScrollViewerAutomationPeer.cs
- AsymmetricAlgorithm.cs
- DiagnosticTrace.cs
- SqlCacheDependency.cs
- ResizeGrip.cs
- MergeLocalizationDirectives.cs
- SystemIPv6InterfaceProperties.cs
- BitmapEffectCollection.cs
- StorageComplexPropertyMapping.cs
- DecimalAnimationBase.cs
- VersionPair.cs
- JavaScriptObjectDeserializer.cs