CustomCategoryAttribute.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / MS / Internal / CustomCategoryAttribute.cs / 1305600 / CustomCategoryAttribute.cs

                            //---------------------------------------------------------------------------- 
//
// Copyright (C) Microsoft Corporation.  All rights reserved.
//
//--------------------------------------------------------------------------- 

using System; 
using System.ComponentModel; 
using MS.Internal.PresentationCore;
 
namespace MS.Internal
{
    /// 
    ///     Allows for localizing custom categories. 
    /// 
    ///  
    ///     This class could be shared amongst any of the assemblies if desired. 
    /// 
    internal sealed class CustomCategoryAttribute : CategoryAttribute 
    {
        internal CustomCategoryAttribute() : base()
        {
        } 

        internal CustomCategoryAttribute(string category) : base(category) 
        { 
        }
 
        protected override string GetLocalizedString(string value)
        {
            string s = SR.Get(value);
            if (s != null) 
            {
                return s; 
            } 
            else
            { 
                return value;
            }
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//---------------------------------------------------------------------------- 
//
// Copyright (C) Microsoft Corporation.  All rights reserved.
//
//--------------------------------------------------------------------------- 

using System; 
using System.ComponentModel; 
using MS.Internal.PresentationCore;
 
namespace MS.Internal
{
    /// 
    ///     Allows for localizing custom categories. 
    /// 
    ///  
    ///     This class could be shared amongst any of the assemblies if desired. 
    /// 
    internal sealed class CustomCategoryAttribute : CategoryAttribute 
    {
        internal CustomCategoryAttribute() : base()
        {
        } 

        internal CustomCategoryAttribute(string category) : base(category) 
        { 
        }
 
        protected override string GetLocalizedString(string value)
        {
            string s = SR.Get(value);
            if (s != null) 
            {
                return s; 
            } 
            else
            { 
                return value;
            }
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK