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
- WrappedIUnknown.cs
- SecurityTraceRecordHelper.cs
- SqlClientWrapperSmiStreamChars.cs
- dbdatarecord.cs
- DefaultTypeArgumentAttribute.cs
- BaseTemplateCodeDomTreeGenerator.cs
- LookupTables.cs
- Int32KeyFrameCollection.cs
- LineBreakRecord.cs
- CommandEventArgs.cs
- Stack.cs
- EncoderBestFitFallback.cs
- XmlReflectionMember.cs
- AlternateViewCollection.cs
- SqlDataSourceStatusEventArgs.cs
- HtmlShim.cs
- OLEDB_Util.cs
- ChildTable.cs
- DataSourceBooleanViewSchemaConverter.cs
- StackBuilderSink.cs
- AbsoluteQuery.cs
- ToolStripPanelRow.cs
- CompensationExtension.cs
- FormViewInsertedEventArgs.cs
- HMACMD5.cs
- AssemblyNameProxy.cs
- MaskPropertyEditor.cs
- elementinformation.cs
- NumericPagerField.cs
- ChangeToolStripParentVerb.cs
- WebServiceClientProxyGenerator.cs
- SizeChangedInfo.cs
- StackSpiller.cs
- XmlSchemaObjectTable.cs
- ProvideValueServiceProvider.cs
- PrimaryKeyTypeConverter.cs
- WebBrowserUriTypeConverter.cs
- CounterSample.cs
- ObjectQuery_EntitySqlExtensions.cs
- VersionPair.cs
- SuppressIldasmAttribute.cs
- BinaryFormatter.cs
- JsonReaderWriterFactory.cs
- ObjectSecurity.cs
- IgnoreDataMemberAttribute.cs
- QilFunction.cs
- AssemblyHelper.cs
- SimpleLine.cs
- ExpressionNode.cs
- ToolStrip.cs
- SortFieldComparer.cs
- FieldCollectionEditor.cs
- Thumb.cs
- httpapplicationstate.cs
- Command.cs
- FreeFormDesigner.cs
- UrlMapping.cs
- Update.cs
- GroupQuery.cs
- FontStyles.cs
- __FastResourceComparer.cs
- QueryOperator.cs
- NameValuePermission.cs
- CodeLabeledStatement.cs
- TextRange.cs
- WebPartTransformerAttribute.cs
- ToolStripProgressBar.cs
- AttachmentService.cs
- HighContrastHelper.cs
- Choices.cs
- ApplicationContext.cs
- BuildResult.cs
- CompositeScriptReferenceEventArgs.cs
- TraceSection.cs
- AtomPub10CategoriesDocumentFormatter.cs
- StaticResourceExtension.cs
- ToolStripGripRenderEventArgs.cs
- RuntimeConfigLKG.cs
- SqlError.cs
- BinaryParser.cs
- KerberosRequestorSecurityToken.cs
- ArraySegment.cs
- ValidationPropertyAttribute.cs
- HttpHandler.cs
- ZoneButton.cs
- Security.cs
- BindingExpressionUncommonField.cs
- FreezableDefaultValueFactory.cs
- documentsequencetextcontainer.cs
- HealthMonitoringSectionHelper.cs
- CompModSwitches.cs
- TableHeaderCell.cs
- ListDesigner.cs
- SoapIgnoreAttribute.cs
- PartialArray.cs
- StyleModeStack.cs
- BitConverter.cs
- SafeFileHandle.cs
- VerificationAttribute.cs
- NavigationPropertyEmitter.cs