Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / 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 [....]
//
//---------------------------------------------------------------------------
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.
//----------------------------------------------------------------------------
//
// 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 [....]
//
//---------------------------------------------------------------------------
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
- FixedNode.cs
- DataGridPageChangedEventArgs.cs
- DataRowComparer.cs
- SelectionEditor.cs
- DataKeyPropertyAttribute.cs
- ToolStripItemTextRenderEventArgs.cs
- TypeLoadException.cs
- PeerContact.cs
- VariableElement.cs
- IdentifierCreationService.cs
- ComPlusServiceHost.cs
- DocumentGridContextMenu.cs
- CursorConverter.cs
- StreamSecurityUpgradeAcceptor.cs
- SourceItem.cs
- SmtpReplyReaderFactory.cs
- BitmapSizeOptions.cs
- InputScopeConverter.cs
- AuthenticodeSignatureInformation.cs
- DataControlFieldCell.cs
- NoClickablePointException.cs
- Crypto.cs
- IdnElement.cs
- PersonalizationStateInfo.cs
- BuilderPropertyEntry.cs
- MachineSettingsSection.cs
- FontStretch.cs
- StorageAssociationSetMapping.cs
- MemberMemberBinding.cs
- DataTemplate.cs
- PnrpPeerResolver.cs
- MimeParameters.cs
- ReadOnlyCollectionBase.cs
- SubMenuStyleCollection.cs
- QilInvoke.cs
- BaseDataListDesigner.cs
- Codec.cs
- ColorDialog.cs
- HttpDebugHandler.cs
- SettingsSection.cs
- Rights.cs
- SafeSystemMetrics.cs
- DataGridViewDataConnection.cs
- AuthenticationSchemesHelper.cs
- TextSimpleMarkerProperties.cs
- HashFinalRequest.cs
- ToolboxBitmapAttribute.cs
- InfoCardKeyedHashAlgorithm.cs
- SQLInt16.cs
- OdbcReferenceCollection.cs
- BookmarkManager.cs
- SoapMessage.cs
- XPathDocument.cs
- IdentityHolder.cs
- CaseInsensitiveComparer.cs
- DataFormats.cs
- UxThemeWrapper.cs
- WebPartMenuStyle.cs
- SupportsEventValidationAttribute.cs
- SecurityRequiresReviewAttribute.cs
- ModuleConfigurationInfo.cs
- InputLangChangeRequestEvent.cs
- GlobalizationSection.cs
- CatalogPart.cs
- AttachedPropertiesService.cs
- RegexMatch.cs
- XPathNavigatorKeyComparer.cs
- OneOf.cs
- AtomContentProperty.cs
- ToolStripStatusLabel.cs
- WindowAutomationPeer.cs
- RepeatBehavior.cs
- SimpleFieldTemplateUserControl.cs
- XamlTreeBuilderBamlRecordWriter.cs
- ProtocolsSection.cs
- TextSyndicationContentKindHelper.cs
- SystemIcmpV4Statistics.cs
- EntityCodeGenerator.cs
- MatrixConverter.cs
- CompilationUtil.cs
- BitmapEffectCollection.cs
- XmlnsDefinitionAttribute.cs
- SelectorAutomationPeer.cs
- MoveSizeWinEventHandler.cs
- ElementUtil.cs
- SmiContext.cs
- IteratorDescriptor.cs
- GridViewEditEventArgs.cs
- Hashtable.cs
- ObjectDisposedException.cs
- PropertyBuilder.cs
- ApplicationServiceManager.cs
- WindowsRichEditRange.cs
- HtmlFormParameterWriter.cs
- ScriptServiceAttribute.cs
- QualificationDataItem.cs
- LabelLiteral.cs
- TextEncodedRawTextWriter.cs
- BufferBuilder.cs
- ObjectReaderCompiler.cs