Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / LocalizabilityAttribute.cs / 1 / LocalizabilityAttribute.cs
//------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation, 2001 // // File: LocalizabiltyAttribute.cs // // Contents: Localizability attributes // // Created: 3/17/2004 [....] // 7/19/2004 [....], Update according to new spec. // // //----------------------------------------------------------------------- using System; using System.ComponentModel; namespace System.Windows { ////// Specifies the localization preferences for a class or property in Baml /// The attribute can be specified on Class, Property and Method /// [AttributeUsage( AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Enum | AttributeTargets.Struct, AllowMultiple = false, Inherited = true) ] public sealed class LocalizabilityAttribute : Attribute { ////// Construct a LocalizabilityAttribute to describe the localizability of a property. /// Modifiability property default to Modifiability.Modifiable, and Readability property /// default to Readability.Readable. /// /// the string category given to the item public LocalizabilityAttribute(LocalizationCategory category) { if ( category < LocalizationCategory.None || category > LocalizationCategory.NeverLocalize) { throw new InvalidEnumArgumentException( "category", (int)category, typeof(LocalizationCategory) ); } _category = category; _readability = Readability.Readable; _modifiability = Modifiability.Modifiable; } ////// String category /// ///gets or sets the string category for the item public LocalizationCategory Category { // should have only getter, because it is a required parameter to the constructor get { return _category; } } ////// Get or set the readability of the attribute's targeted value /// ///Readability public Readability Readability { get { return _readability; } set { if ( value != Readability.Unreadable && value != Readability.Readable && value != Readability.Inherit) { throw new InvalidEnumArgumentException("Readability", (int) value, typeof(Readability)); } _readability = value; } } ////// Get or set the modifiability of the attribute's targeted value /// ///Modifiability public Modifiability Modifiability { get { return _modifiability; } set { if ( value != Modifiability.Unmodifiable && value != Modifiability.Modifiable && value != Modifiability.Inherit) { throw new InvalidEnumArgumentException("Modifiability", (int) value, typeof(Modifiability)); } _modifiability = value; } } //-------------------------------------------- // Private members //-------------------------------------------- private LocalizationCategory _category; private Readability _readability; private Modifiability _modifiability; } } // 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
- SqlDataSourceFilteringEventArgs.cs
- XpsTokenContext.cs
- DesignerActionList.cs
- Clause.cs
- DesignerHost.cs
- MessagePropertyFilter.cs
- SafeEventLogWriteHandle.cs
- SequenceDesignerAccessibleObject.cs
- Thickness.cs
- AsyncInvokeOperation.cs
- figurelengthconverter.cs
- ToolboxComponentsCreatingEventArgs.cs
- ProcessInfo.cs
- AlphaSortedEnumConverter.cs
- HyperLinkStyle.cs
- UnsafeNativeMethods.cs
- DictionaryTraceRecord.cs
- SafeEventLogReadHandle.cs
- FileClassifier.cs
- BorderGapMaskConverter.cs
- SHA512Managed.cs
- VerificationAttribute.cs
- IRCollection.cs
- SignatureTargetIdManager.cs
- Attribute.cs
- MultipleViewProviderWrapper.cs
- Executor.cs
- ManifestSignatureInformation.cs
- RightNameExpirationInfoPair.cs
- TraceSection.cs
- LocalizeDesigner.cs
- Version.cs
- EmptyEnumerable.cs
- TextSpanModifier.cs
- DocumentAutomationPeer.cs
- ChildDocumentBlock.cs
- BasicCellRelation.cs
- SystemResourceHost.cs
- MetadataArtifactLoaderCompositeFile.cs
- PageSetupDialog.cs
- ControlPropertyNameConverter.cs
- FontInfo.cs
- _BaseOverlappedAsyncResult.cs
- localization.cs
- ContextBase.cs
- DataSourceView.cs
- ToolboxComponentsCreatingEventArgs.cs
- PixelShader.cs
- DesignerSerializationVisibilityAttribute.cs
- TemplateControlBuildProvider.cs
- TripleDESCryptoServiceProvider.cs
- FixedNode.cs
- DbConnectionPoolCounters.cs
- EntityDataSource.cs
- SkipStoryboardToFill.cs
- DiscreteKeyFrames.cs
- CollectionsUtil.cs
- WindowsProgressbar.cs
- Trace.cs
- WarningException.cs
- TaskFileService.cs
- SafeViewOfFileHandle.cs
- BypassElementCollection.cs
- NegotiateStream.cs
- ToolStripItemGlyph.cs
- XpsSerializationManagerAsync.cs
- CustomAttributeBuilder.cs
- PrtTicket_Public.cs
- ProfileServiceManager.cs
- ResourceIDHelper.cs
- StringArrayConverter.cs
- WebPartConnectionsCancelVerb.cs
- ScriptControlManager.cs
- DataGridColumn.cs
- PropertyItemInternal.cs
- CodeChecksumPragma.cs
- CapabilitiesUse.cs
- Privilege.cs
- ControlParser.cs
- DetailsView.cs
- ConfigurationLocation.cs
- WebEventCodes.cs
- ManagementEventWatcher.cs
- IListConverters.cs
- StreamReader.cs
- ExtensionDataReader.cs
- IISMapPath.cs
- RegexInterpreter.cs
- PersonalizablePropertyEntry.cs
- CompleteWizardStep.cs
- DynamicPropertyHolder.cs
- ListViewInsertedEventArgs.cs
- WebException.cs
- DebugView.cs
- WebPartCancelEventArgs.cs
- GlyphElement.cs
- SqlUDTStorage.cs
- StrokeRenderer.cs
- PeerCollaboration.cs
- InstanceData.cs