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
- ValidationErrorEventArgs.cs
- DataTableNewRowEvent.cs
- UriWriter.cs
- LayoutEngine.cs
- DialogResultConverter.cs
- WebBrowserProgressChangedEventHandler.cs
- PropertyDescriptorComparer.cs
- GeneralTransform2DTo3DTo2D.cs
- webbrowsersite.cs
- TdsParserSessionPool.cs
- ClientSettingsProvider.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- UserPreferenceChangedEventArgs.cs
- Trigger.cs
- Point3DKeyFrameCollection.cs
- ImageAttributes.cs
- ValidationErrorEventArgs.cs
- FaultDescription.cs
- TreeNodeStyleCollection.cs
- ModifierKeysConverter.cs
- ByeOperation11AsyncResult.cs
- GridViewCommandEventArgs.cs
- WorkerRequest.cs
- InvalidBodyAccessException.cs
- WindowsTokenRoleProvider.cs
- DesignTimeParseData.cs
- CommandField.cs
- DataServiceBehavior.cs
- DataGrid.cs
- TypeConverterHelper.cs
- InputLanguageEventArgs.cs
- Polygon.cs
- DeploymentSection.cs
- StyleHelper.cs
- DbTransaction.cs
- ClipboardProcessor.cs
- XmlHierarchicalEnumerable.cs
- DefaultCommandConverter.cs
- RowUpdatingEventArgs.cs
- BooleanProjectedSlot.cs
- ToolboxControl.cs
- CopyCodeAction.cs
- MultipleViewPattern.cs
- AdornerPresentationContext.cs
- TextBox.cs
- SqlResolver.cs
- MediaScriptCommandRoutedEventArgs.cs
- SqlDependencyListener.cs
- AppSettingsReader.cs
- ImportContext.cs
- HorizontalAlignConverter.cs
- Span.cs
- WorkerRequest.cs
- PropertyValueUIItem.cs
- Activator.cs
- GridViewColumnHeader.cs
- ControlValuePropertyAttribute.cs
- ProviderBase.cs
- LifetimeServices.cs
- ReadOnlyCollection.cs
- HandleRef.cs
- DiscriminatorMap.cs
- XmlFormatExtensionAttribute.cs
- ParameterBuilder.cs
- DrawToolTipEventArgs.cs
- NavigatorInput.cs
- AdornerHitTestResult.cs
- XmlStringTable.cs
- EncryptedPackage.cs
- EventListenerClientSide.cs
- serverconfig.cs
- HttpResponseWrapper.cs
- TaskSchedulerException.cs
- RelationshipDetailsCollection.cs
- ApplicationSettingsBase.cs
- TextBounds.cs
- DataListItemEventArgs.cs
- SchemaImporterExtensionElementCollection.cs
- XmlSerializerVersionAttribute.cs
- MsdtcWrapper.cs
- dataprotectionpermissionattribute.cs
- OrderToken.cs
- LaxModeSecurityHeaderElementInferenceEngine.cs
- XmlQueryContext.cs
- CanExecuteRoutedEventArgs.cs
- ComNativeDescriptor.cs
- JumpList.cs
- LocalizationComments.cs
- ForeignKeyConstraint.cs
- ThumbAutomationPeer.cs
- MatrixAnimationUsingKeyFrames.cs
- ExceptionValidationRule.cs
- MarkupCompilePass1.cs
- MsmqIntegrationBindingElement.cs
- DefaultValueTypeConverter.cs
- PersonalizablePropertyEntry.cs
- XmlDomTextWriter.cs
- ContractListAdapter.cs
- MissingMethodException.cs
- PostBackOptions.cs