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
- FontFamily.cs
- PKCS1MaskGenerationMethod.cs
- PropertyMetadata.cs
- EntitySetDataBindingList.cs
- TextServicesCompartmentContext.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- HtmlProps.cs
- EventLogTraceListener.cs
- _ProxyRegBlob.cs
- Byte.cs
- MouseActionConverter.cs
- ComplexTypeEmitter.cs
- NumberAction.cs
- RightsManagementEncryptedStream.cs
- PostBackOptions.cs
- DbConnectionFactory.cs
- RenderingEventArgs.cs
- XmlSchemaSequence.cs
- HttpListenerPrefixCollection.cs
- Errors.cs
- HttpBrowserCapabilitiesWrapper.cs
- StringAttributeCollection.cs
- ClientConvert.cs
- PrintDialogException.cs
- OracleDataAdapter.cs
- AsyncSerializedWorker.cs
- ServiceHostingEnvironment.cs
- RepeaterItem.cs
- FormatterServices.cs
- MultiView.cs
- SerializationTrace.cs
- SiteMapDataSourceDesigner.cs
- ToolboxCategory.cs
- OdbcEnvironmentHandle.cs
- DocumentScope.cs
- FlowDocumentScrollViewer.cs
- DispatcherHooks.cs
- SqlFunctions.cs
- SoapSchemaExporter.cs
- RelationshipWrapper.cs
- TextTreeUndoUnit.cs
- PermissionSet.cs
- SqlErrorCollection.cs
- PartitionedStream.cs
- ClassicBorderDecorator.cs
- SqlInternalConnection.cs
- Helper.cs
- MarkedHighlightComponent.cs
- SimpleBitVector32.cs
- RadioButton.cs
- ResolvePPIDRequest.cs
- GridLength.cs
- Misc.cs
- ConnectionManagementElement.cs
- TransformedBitmap.cs
- DataSourceControl.cs
- WinFormsComponentEditor.cs
- VBIdentifierTrimConverter.cs
- BlurBitmapEffect.cs
- File.cs
- PrintEvent.cs
- StdValidatorsAndConverters.cs
- KeyGesture.cs
- DesignerTransactionCloseEvent.cs
- XamlSerializer.cs
- COMException.cs
- ToolStripItemBehavior.cs
- RoleProviderPrincipal.cs
- PromptBuilder.cs
- VisualTransition.cs
- Signature.cs
- ReferencedAssembly.cs
- DoubleLinkListEnumerator.cs
- MsmqInputSessionChannel.cs
- OperationAbortedException.cs
- DivideByZeroException.cs
- ThemeableAttribute.cs
- WindowPattern.cs
- WindowsTab.cs
- FactoryGenerator.cs
- SchemaCompiler.cs
- UserControl.cs
- initElementDictionary.cs
- ProfileService.cs
- AppDomainResourcePerfCounters.cs
- DataColumnCollection.cs
- ClientBuildManager.cs
- AliasExpr.cs
- _emptywebproxy.cs
- FacetDescriptionElement.cs
- AttachedAnnotationChangedEventArgs.cs
- ComponentManagerBroker.cs
- SqlServer2KCompatibilityAnnotation.cs
- TypeLibConverter.cs
- IntegerValidator.cs
- SymLanguageType.cs
- FlowDocumentPaginator.cs
- HtmlMeta.cs
- HandledEventArgs.cs
- HtmlTable.cs