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
- SizeAnimationClockResource.cs
- DataObjectCopyingEventArgs.cs
- XPathChildIterator.cs
- DataRelationCollection.cs
- RectangleConverter.cs
- ProjectionPlanCompiler.cs
- HtmlControlPersistable.cs
- WindowsIdentity.cs
- SchemaName.cs
- InputProcessorProfiles.cs
- UnsafeNativeMethods.cs
- HtmlLiteralTextAdapter.cs
- DataReaderContainer.cs
- InfoCardTraceRecord.cs
- PermissionSet.cs
- ListBindingConverter.cs
- HealthMonitoringSection.cs
- CalendarTable.cs
- ApplicationTrust.cs
- WebSysDefaultValueAttribute.cs
- RuntimeWrappedException.cs
- SiteMapSection.cs
- GridViewRowCollection.cs
- ConstructorExpr.cs
- XmlSchemaValidator.cs
- IndicFontClient.cs
- RbTree.cs
- MetadataPropertyvalue.cs
- SkewTransform.cs
- DataGridItemCollection.cs
- BaseInfoTable.cs
- MenuScrollingVisibilityConverter.cs
- HtmlInputHidden.cs
- mediapermission.cs
- IndexedGlyphRun.cs
- FontFamilyIdentifier.cs
- XmlWrappingReader.cs
- ThreadInterruptedException.cs
- RightsManagementPermission.cs
- ClientCultureInfo.cs
- CustomErrorCollection.cs
- sqlser.cs
- LogicalExpr.cs
- GroupQuery.cs
- Hash.cs
- MetadataArtifactLoaderCompositeFile.cs
- XmlSchemaSimpleTypeUnion.cs
- OleDbError.cs
- LiteralControl.cs
- AQNBuilder.cs
- ProtocolsConfigurationHandler.cs
- CodeTypeMember.cs
- NetSectionGroup.cs
- XmlSchemaComplexContentRestriction.cs
- SystemNetHelpers.cs
- BaseTemplateCodeDomTreeGenerator.cs
- SectionInformation.cs
- DoubleCollectionValueSerializer.cs
- Panel.cs
- DataExchangeServiceBinder.cs
- SoapObjectInfo.cs
- AuthorizationRule.cs
- DbConnectionPoolGroupProviderInfo.cs
- DialogWindow.cs
- DataComponentGenerator.cs
- StrokeCollectionConverter.cs
- LineMetrics.cs
- ToolStripGrip.cs
- NumericPagerField.cs
- FontDriver.cs
- HttpPostClientProtocol.cs
- DataGridViewRowCollection.cs
- ComAdminInterfaces.cs
- WebSysDisplayNameAttribute.cs
- ResizeGrip.cs
- IISUnsafeMethods.cs
- StructuralObject.cs
- Addressing.cs
- GetMemberBinder.cs
- BoundsDrawingContextWalker.cs
- Formatter.cs
- Validator.cs
- StateDesigner.CommentLayoutGlyph.cs
- WindowsGraphicsWrapper.cs
- XsdDateTime.cs
- XmlSerializationWriter.cs
- ClonableStack.cs
- XPathEmptyIterator.cs
- ModuleBuilderData.cs
- Table.cs
- FilterEventArgs.cs
- XmlHelper.cs
- DataGridState.cs
- X500Name.cs
- MarginsConverter.cs
- versioninfo.cs
- RtfControls.cs
- PaintValueEventArgs.cs
- TransportSecurityProtocol.cs
- WebPermission.cs