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
- EditorResources.cs
- HandleRef.cs
- RangeValuePatternIdentifiers.cs
- PropertyGeneratedEventArgs.cs
- GridItemCollection.cs
- ExpressionTextBox.xaml.cs
- FixedTextPointer.cs
- BorderGapMaskConverter.cs
- BindUriHelper.cs
- WorkflowOwnerAsyncResult.cs
- Accessible.cs
- XmlAttributes.cs
- Compiler.cs
- PropertyNames.cs
- ConstraintConverter.cs
- documentsequencetextcontainer.cs
- TemplateBindingExpression.cs
- FlowDocumentReader.cs
- SizeConverter.cs
- SmiTypedGetterSetter.cs
- UnsafeNativeMethods.cs
- TableHeaderCell.cs
- EncryptedReference.cs
- CodeDirectiveCollection.cs
- ErrorWrapper.cs
- XamlFigureLengthSerializer.cs
- updatecommandorderer.cs
- RichTextBoxAutomationPeer.cs
- LogicalExpr.cs
- GradientBrush.cs
- NativeWindow.cs
- DbConnectionInternal.cs
- TemplateDefinition.cs
- CanExecuteRoutedEventArgs.cs
- ToolStripButton.cs
- HtmlAnchor.cs
- BamlTreeUpdater.cs
- XmlSchemaSimpleType.cs
- ScriptHandlerFactory.cs
- GridViewSortEventArgs.cs
- SymLanguageType.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- VideoDrawing.cs
- IntAverageAggregationOperator.cs
- KeyConverter.cs
- XPathPatternBuilder.cs
- DeclarativeConditionsCollection.cs
- ResizeGrip.cs
- DecimalAnimationUsingKeyFrames.cs
- ObjectQuery_EntitySqlExtensions.cs
- DifferencingCollection.cs
- DataGridViewDataErrorEventArgs.cs
- StoreContentChangedEventArgs.cs
- DataGridViewRowStateChangedEventArgs.cs
- CannotUnloadAppDomainException.cs
- StorageMappingItemCollection.cs
- CacheModeValueSerializer.cs
- newinstructionaction.cs
- RowBinding.cs
- HostedNamedPipeTransportManager.cs
- ImageListStreamer.cs
- TreeViewImageIndexConverter.cs
- CqlLexerHelpers.cs
- GacUtil.cs
- CharAnimationBase.cs
- MutexSecurity.cs
- OperationFormatStyle.cs
- CellLabel.cs
- SemanticResolver.cs
- BCLDebug.cs
- DataObjectAttribute.cs
- OrderedDictionary.cs
- ToolStripScrollButton.cs
- StrongNameKeyPair.cs
- ByteStreamMessageEncodingElement.cs
- ClientScriptManagerWrapper.cs
- WaitHandleCannotBeOpenedException.cs
- EventMappingSettings.cs
- ConnectionPoolManager.cs
- UserControl.cs
- CqlWriter.cs
- Property.cs
- DataError.cs
- ObjRef.cs
- CqlQuery.cs
- sqlinternaltransaction.cs
- LicenseContext.cs
- ChooseAction.cs
- Vector3DValueSerializer.cs
- TextServicesPropertyRanges.cs
- XdrBuilder.cs
- SafeProcessHandle.cs
- EventWaitHandle.cs
- WebPartCancelEventArgs.cs
- SqlDelegatedTransaction.cs
- FlatButtonAppearance.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- Exceptions.cs
- RenderingEventArgs.cs
- SecurityTokenProvider.cs