Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- MetadataItemEmitter.cs
- SystemBrushes.cs
- QuaternionAnimationBase.cs
- ResourceIDHelper.cs
- CalendarButtonAutomationPeer.cs
- PointF.cs
- NamespaceCollection.cs
- MessageDecoder.cs
- RpcCryptoContext.cs
- LicenseManager.cs
- TreeNodeEventArgs.cs
- RuleRefElement.cs
- VisualBasicSettings.cs
- LinqDataSourceStatusEventArgs.cs
- MouseEventArgs.cs
- ProjectedWrapper.cs
- AccessibilityHelperForVista.cs
- TextTrailingWordEllipsis.cs
- UpWmlPageAdapter.cs
- MethodToken.cs
- Expr.cs
- Environment.cs
- SQLInt16Storage.cs
- FormatterServices.cs
- DesignerActionGlyph.cs
- SequenceFullException.cs
- DataGridCell.cs
- NameValuePair.cs
- String.cs
- MergePropertyDescriptor.cs
- IsolatedStorageException.cs
- ControlEvent.cs
- SerializerWriterEventHandlers.cs
- DebugTracing.cs
- DataGridrowEditEndingEventArgs.cs
- QuotedStringFormatReader.cs
- CreateUserWizardAutoFormat.cs
- XmlSchemaSimpleTypeUnion.cs
- DetailsViewRow.cs
- FileCodeGroup.cs
- FormViewUpdatedEventArgs.cs
- SpotLight.cs
- XmlSchemaImporter.cs
- XomlDesignerLoader.cs
- ScanQueryOperator.cs
- CollectionAdapters.cs
- InheritedPropertyChangedEventArgs.cs
- ItemsPanelTemplate.cs
- Parameter.cs
- D3DImage.cs
- XmlQueryOutput.cs
- TryCatchDesigner.xaml.cs
- BasicHttpMessageSecurityElement.cs
- XmlLanguageConverter.cs
- AuthenticationModulesSection.cs
- BaseInfoTable.cs
- SystemWebCachingSectionGroup.cs
- Point3D.cs
- Wrapper.cs
- CacheEntry.cs
- TaiwanCalendar.cs
- BlockUIContainer.cs
- DependencyStoreSurrogate.cs
- BatchStream.cs
- FilterableAttribute.cs
- CfgSemanticTag.cs
- MultiTrigger.cs
- Int16AnimationUsingKeyFrames.cs
- WindowsStreamSecurityUpgradeProvider.cs
- LayoutDump.cs
- XmlIterators.cs
- PrePrepareMethodAttribute.cs
- WindowsListViewGroup.cs
- PerformanceCounterManager.cs
- IList.cs
- GridViewDeletedEventArgs.cs
- RowBinding.cs
- ManualResetEvent.cs
- ComNativeDescriptor.cs
- InputScopeConverter.cs
- WindowsStartMenu.cs
- CodeNamespaceImportCollection.cs
- SrgsNameValueTag.cs
- ToolboxItemWrapper.cs
- ServiceDescriptionImporter.cs
- Drawing.cs
- NativeMethods.cs
- Point3DAnimation.cs
- RC2CryptoServiceProvider.cs
- ProtocolsConfiguration.cs
- GraphicsState.cs
- ComNativeDescriptor.cs
- GeometryGroup.cs
- ServiceHostFactory.cs
- ResourceExpressionBuilder.cs
- AuthenticatedStream.cs
- HtmlDocument.cs
- ToolboxComponentsCreatingEventArgs.cs
- MarginCollapsingState.cs
- HMACSHA1.cs