Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- LifetimeServices.cs
- WebRequestModuleElementCollection.cs
- GB18030Encoding.cs
- ResourceType.cs
- Screen.cs
- WebException.cs
- DynamicPropertyReader.cs
- BitmapVisualManager.cs
- HttpRequestContext.cs
- SystemIPGlobalProperties.cs
- Geometry.cs
- RequestCache.cs
- UnderstoodHeaders.cs
- OpenFileDialog.cs
- RuntimeWrappedException.cs
- PipelineModuleStepContainer.cs
- CachingHintValidation.cs
- SectionInput.cs
- InputLanguageSource.cs
- ListBindingConverter.cs
- EncryptedPackageFilter.cs
- WebPartVerb.cs
- TraceProvider.cs
- FontCollection.cs
- FormClosedEvent.cs
- TransformDescriptor.cs
- DbParameterCollectionHelper.cs
- HandledMouseEvent.cs
- MethodInfo.cs
- LicFileLicenseProvider.cs
- DrawingAttributesDefaultValueFactory.cs
- WindowCollection.cs
- ApplicationFileCodeDomTreeGenerator.cs
- Container.cs
- DataMemberConverter.cs
- XMLSchema.cs
- WorkerRequest.cs
- CodeVariableDeclarationStatement.cs
- ToolStripPanelRenderEventArgs.cs
- SqlEnums.cs
- DataError.cs
- codemethodreferenceexpression.cs
- DataBinding.cs
- Collection.cs
- Vector3DCollectionConverter.cs
- RequestDescription.cs
- ChangesetResponse.cs
- PageRequestManager.cs
- DesignerActionMethodItem.cs
- TransactionsSectionGroup.cs
- HttpCacheVaryByContentEncodings.cs
- HandleRef.cs
- TrackingMemoryStream.cs
- StrokeNodeOperations.cs
- BitmapSource.cs
- Privilege.cs
- ApplicationManager.cs
- Int64AnimationBase.cs
- IntegerValidatorAttribute.cs
- CompatibleComparer.cs
- SqlCacheDependencyDatabaseCollection.cs
- HotSpotCollection.cs
- Splitter.cs
- remotingproxy.cs
- ProviderUtil.cs
- XmlSerializationWriter.cs
- AdapterDictionary.cs
- Utils.cs
- ByteStack.cs
- XmlSchemaCompilationSettings.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- CacheDependency.cs
- SiteMapDataSourceView.cs
- SynchronizationContext.cs
- AssemblyAttributes.cs
- Keywords.cs
- StrokeNodeOperations.cs
- CatalogZone.cs
- ClientBuildManager.cs
- PersistenceProviderBehavior.cs
- ListItemParagraph.cs
- ObjectParameterCollection.cs
- MessageContractImporter.cs
- TextDecorationUnitValidation.cs
- HiddenFieldPageStatePersister.cs
- MetadataPropertyCollection.cs
- AttributeTableBuilder.cs
- BaseResourcesBuildProvider.cs
- Vector3DAnimation.cs
- FontStretch.cs
- PartialClassGenerationTask.cs
- SerializationStore.cs
- Selector.cs
- Ipv6Element.cs
- ListBindableAttribute.cs
- oledbmetadatacolumnnames.cs
- HttpDictionary.cs
- CurrentChangingEventArgs.cs
- RetriableClipboard.cs
- WindowsUpDown.cs