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
- HttpContext.cs
- AssociationEndMember.cs
- TableLayoutPanelCellPosition.cs
- RowToParametersTransformer.cs
- Freezable.cs
- CreateUserWizard.cs
- BackEase.cs
- MILUtilities.cs
- AttachmentService.cs
- PointCollectionValueSerializer.cs
- FilterInvalidBodyAccessException.cs
- PhysicalAddress.cs
- CapabilitiesPattern.cs
- XmlAtomicValue.cs
- DataGridViewUtilities.cs
- EncryptedKey.cs
- RuntimeCompatibilityAttribute.cs
- RawContentTypeMapper.cs
- ItemPager.cs
- MediaScriptCommandRoutedEventArgs.cs
- Pipe.cs
- SqlInternalConnection.cs
- Tablet.cs
- PreservationFileWriter.cs
- XPathNodeHelper.cs
- ProtocolElementCollection.cs
- WrapPanel.cs
- MethodAccessException.cs
- SqlSupersetValidator.cs
- DatasetMethodGenerator.cs
- ConnectionPoint.cs
- SortExpressionBuilder.cs
- AddDataControlFieldDialog.cs
- CodeTypeParameter.cs
- ByteAnimation.cs
- MultilineStringEditor.cs
- StreamUpdate.cs
- BindingNavigator.cs
- CacheOutputQuery.cs
- ChannelRequirements.cs
- InputGestureCollection.cs
- FastEncoderWindow.cs
- MinimizableAttributeTypeConverter.cs
- AppDomainManager.cs
- OneOfScalarConst.cs
- BuildResultCache.cs
- XmlTextAttribute.cs
- SecurityValidationBehavior.cs
- DataViewSetting.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- HtmlValidationSummaryAdapter.cs
- MbpInfo.cs
- Speller.cs
- DbCommandTree.cs
- BitmapEffectDrawing.cs
- ComponentGuaranteesAttribute.cs
- TextServicesDisplayAttributePropertyRanges.cs
- Point3DAnimationBase.cs
- SqlDataSourceCache.cs
- DataGridViewColumnEventArgs.cs
- Int64AnimationUsingKeyFrames.cs
- XmlAttributeCache.cs
- X509CertificateTrustedIssuerElementCollection.cs
- HtmlLink.cs
- WebBrowser.cs
- TextContainerChangeEventArgs.cs
- HWStack.cs
- DocumentApplication.cs
- ContentValidator.cs
- DefaultShape.cs
- xdrvalidator.cs
- SmtpReplyReader.cs
- AddInBase.cs
- ObjectParameterCollection.cs
- RawTextInputReport.cs
- ColumnResult.cs
- NativeRightsManagementAPIsStructures.cs
- ProfileSection.cs
- CacheMemory.cs
- PrintPreviewGraphics.cs
- DeclaredTypeElement.cs
- ElementUtil.cs
- XmlValidatingReader.cs
- WSFederationHttpSecurity.cs
- DataTemplateKey.cs
- ProfilePropertySettings.cs
- Message.cs
- BatchServiceHost.cs
- HelpEvent.cs
- NativeMethodsCLR.cs
- XmlSchemaElement.cs
- ToolStripItemTextRenderEventArgs.cs
- XmlSchemaInfo.cs
- SystemDiagnosticsSection.cs
- UnsettableComboBox.cs
- HybridWebProxyFinder.cs
- SafeEventHandle.cs
- Cell.cs
- BStrWrapper.cs
- AggregateNode.cs