Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / Design / Serialization / DesignerSerializerAttribute.cs / 1 / DesignerSerializerAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel.Design.Serialization { using System.Security.Permissions; ////// This attribute can be placed on a class to indicate what serialization /// object should be used to serialize the class at design time. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = true, Inherited = true)] public sealed class DesignerSerializerAttribute : Attribute { private string serializerTypeName; private string serializerBaseTypeName; private string typeId; ////// Creates a new designer serialization attribute. /// public DesignerSerializerAttribute(Type serializerType, Type baseSerializerType) { this.serializerTypeName = serializerType.AssemblyQualifiedName; this.serializerBaseTypeName = baseSerializerType.AssemblyQualifiedName; } ////// Creates a new designer serialization attribute. /// public DesignerSerializerAttribute(string serializerTypeName, Type baseSerializerType) { this.serializerTypeName = serializerTypeName; this.serializerBaseTypeName = baseSerializerType.AssemblyQualifiedName; } ////// Creates a new designer serialization attribute. /// public DesignerSerializerAttribute(string serializerTypeName, string baseSerializerTypeName) { this.serializerTypeName = serializerTypeName; this.serializerBaseTypeName = baseSerializerTypeName; } ////// Retrieves the fully qualified type name of the serializer. /// public string SerializerTypeName { get { return serializerTypeName; } } ////// Retrieves the fully qualified type name of the serializer base type. /// public string SerializerBaseTypeName { get { return serializerBaseTypeName; } } ////// /// public override object TypeId { get { if (typeId == null) { string baseType = serializerBaseTypeName; int comma = baseType.IndexOf(','); if (comma != -1) { baseType = baseType.Substring(0, comma); } typeId = GetType().FullName + baseType; } return typeId; } } } }/// This defines a unique ID for this attribute type. It is used /// by filtering algorithms to identify two attributes that are /// the same type. For most attributes, this just returns the /// Type instance for the attribute. EditorAttribute overrides /// this to include the type of the editor base type. /// ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AuthenticationModulesSection.cs
- Region.cs
- ComplexType.cs
- X509SecurityTokenProvider.cs
- IPAddress.cs
- KeyedHashAlgorithm.cs
- HandlerBase.cs
- WebBrowserBase.cs
- ExtendedProtectionPolicy.cs
- SecurityManager.cs
- ToolStripStatusLabel.cs
- ProfileGroupSettings.cs
- SerializationStore.cs
- ObjectDataSourceFilteringEventArgs.cs
- ContextMenu.cs
- RegexCode.cs
- DataGridViewCheckBoxCell.cs
- DrawingBrush.cs
- RawStylusInput.cs
- ActiveXContainer.cs
- XmlCustomFormatter.cs
- ZoneMembershipCondition.cs
- EventLogPermissionEntry.cs
- AlphaSortedEnumConverter.cs
- LinearQuaternionKeyFrame.cs
- TextBlock.cs
- LoginCancelEventArgs.cs
- DataTableClearEvent.cs
- UpdateException.cs
- XmlUTF8TextWriter.cs
- TextAnchor.cs
- ChtmlSelectionListAdapter.cs
- ToolStripOverflow.cs
- UmAlQuraCalendar.cs
- InternalPermissions.cs
- SymmetricSecurityBindingElement.cs
- XmlNotation.cs
- HMACSHA1.cs
- FilePresentation.cs
- ToolStripItemEventArgs.cs
- Helpers.cs
- TripleDESCryptoServiceProvider.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- CorePropertiesFilter.cs
- MSG.cs
- Expression.cs
- XmlSchemaIdentityConstraint.cs
- ToolStripManager.cs
- SoundPlayerAction.cs
- MarkupCompilePass2.cs
- PropertyMetadata.cs
- ObjectViewQueryResultData.cs
- Message.cs
- DataServiceQueryProvider.cs
- MonikerHelper.cs
- Quad.cs
- StylusPointDescription.cs
- SelectionProcessor.cs
- GenericTypeParameterBuilder.cs
- SendMailErrorEventArgs.cs
- UiaCoreApi.cs
- PageOutputQuality.cs
- SiteMapDataSourceView.cs
- CodeConstructor.cs
- ConfigDefinitionUpdates.cs
- InstanceBehavior.cs
- OleDbCommandBuilder.cs
- Attachment.cs
- DataTableClearEvent.cs
- DesignerObject.cs
- MatrixCamera.cs
- DataGridHelper.cs
- RemoteHelper.cs
- InternalUserCancelledException.cs
- XmlRootAttribute.cs
- RuntimeEnvironment.cs
- InplaceBitmapMetadataWriter.cs
- TTSEngineTypes.cs
- Action.cs
- EntityModelSchemaGenerator.cs
- MimeObjectFactory.cs
- XhtmlConformanceSection.cs
- TextBreakpoint.cs
- EntityParameter.cs
- PrintingPermission.cs
- DrawingServices.cs
- OracleRowUpdatingEventArgs.cs
- FlowDecisionDesigner.xaml.cs
- PopupRootAutomationPeer.cs
- ArcSegment.cs
- LabelAutomationPeer.cs
- dataSvcMapFileLoader.cs
- ContextStack.cs
- Propagator.Evaluator.cs
- SapiRecoContext.cs
- TemplatePartAttribute.cs
- DesignerActionService.cs
- CompiledQuery.cs
- SiteMapDataSourceView.cs
- ReadWriteSpinLock.cs