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
- Triplet.cs
- GetFileNameResult.cs
- _OverlappedAsyncResult.cs
- SolidBrush.cs
- ToolStripInSituService.cs
- DictationGrammar.cs
- TableStyle.cs
- ForceCopyBuildProvider.cs
- RefreshPropertiesAttribute.cs
- PixelShader.cs
- cryptoapiTransform.cs
- ManagedFilter.cs
- DataGridCaption.cs
- LongCountAggregationOperator.cs
- DataColumn.cs
- TypeSystemHelpers.cs
- Odbc32.cs
- ResourceManager.cs
- Tokenizer.cs
- DataListCommandEventArgs.cs
- ThreadSafeList.cs
- Math.cs
- SettingsPropertyWrongTypeException.cs
- LeftCellWrapper.cs
- JsonQueryStringConverter.cs
- SqlInternalConnection.cs
- TypeElementCollection.cs
- VisualStyleRenderer.cs
- xmlfixedPageInfo.cs
- MulticastOption.cs
- ColumnMap.cs
- StringFunctions.cs
- __ComObject.cs
- CLSCompliantAttribute.cs
- ButtonFieldBase.cs
- TargetConverter.cs
- ThemeDirectoryCompiler.cs
- UserValidatedEventArgs.cs
- ListViewEditEventArgs.cs
- TextTreeNode.cs
- SecurityContextSecurityTokenResolver.cs
- SoapAttributes.cs
- HitTestResult.cs
- NetNamedPipeBindingCollectionElement.cs
- GrammarBuilderRuleRef.cs
- InputBuffer.cs
- InvalidWMPVersionException.cs
- X509Chain.cs
- DataRow.cs
- MdiWindowListStrip.cs
- ClientConfigurationSystem.cs
- HttpRequestWrapper.cs
- DataSpaceManager.cs
- RecordsAffectedEventArgs.cs
- PropertyDescriptorGridEntry.cs
- XamlFrame.cs
- JsonDeserializer.cs
- activationcontext.cs
- SizeF.cs
- DataControlButton.cs
- TextPointerBase.cs
- ModulesEntry.cs
- FilterQuery.cs
- Size3D.cs
- XmlNamespaceDeclarationsAttribute.cs
- OleDbMetaDataFactory.cs
- HttpProfileGroupBase.cs
- Icon.cs
- SqlDataAdapter.cs
- ContainerFilterService.cs
- GridViewAutoFormat.cs
- QueryMatcher.cs
- QfeChecker.cs
- SpeechEvent.cs
- LayoutUtils.cs
- OleDbParameterCollection.cs
- AsymmetricSignatureDeformatter.cs
- ProjectionPlanCompiler.cs
- CodeTypeDeclarationCollection.cs
- AggregateNode.cs
- ActivityDesigner.cs
- EndpointDiscoveryMetadataCD1.cs
- ToolBarButtonDesigner.cs
- SessionSwitchEventArgs.cs
- ChannelListenerBase.cs
- XMLDiffLoader.cs
- AdRotator.cs
- ReachUIElementCollectionSerializer.cs
- OutputCacheProfileCollection.cs
- NamespaceInfo.cs
- HashMembershipCondition.cs
- FlowStep.cs
- DesignTimeParseData.cs
- Internal.cs
- JsonWriterDelegator.cs
- CookielessData.cs
- FileLevelControlBuilderAttribute.cs
- _TimerThread.cs
- DynamicActivityXamlReader.cs
- LogReserveAndAppendState.cs