当前位置: 首页>>代码示例>>C#>>正文


C# Globalization.TextInfo类代码示例

本文整理汇总了C#中System.Globalization.TextInfo的典型用法代码示例。如果您正苦于以下问题:C# TextInfo类的具体用法?C# TextInfo怎么用?C# TextInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TextInfo类属于System.Globalization命名空间,在下文中一共展示了TextInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CaseInsensitiveHashCodeProvider

 public CaseInsensitiveHashCodeProvider(CultureInfo culture) {
     if (culture==null) {
         throw new ArgumentNullException("culture");
     }
     Contract.EndContractBlock();
     m_text = culture.TextInfo;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:caseinsensitivehashcodeprovider.cs

示例2: CaseInsensitiveHashCodeProvider

		public CaseInsensitiveHashCodeProvider (CultureInfo culture)
		{
			if (culture == null)
 				throw new ArgumentNullException ("culture");
			if (!AreEqual (culture, CultureInfo.InvariantCulture))
				m_text = culture.TextInfo;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:7,代码来源:CaseInsensitiveHashCodeProvider.cs

示例3: EnergyBarWrapper

 public EnergyBarWrapper(EnergyBar bBar, EnergyBar cBar)
 {
     bullsBar = bBar.GetComponent<EnergyBar>();
     cleotsBar = cBar.GetComponent<EnergyBar>();
     // Take that h-bar.
     myTI  = new CultureInfo("en-US",false).TextInfo;
 }
开发者ID:CalPolyGameDevelopment,项目名称:ettell,代码行数:7,代码来源:EnergyBarWrapper.cs

示例4: CaseInsensitiveHashCodeProvider

	public CaseInsensitiveHashCodeProvider(CultureInfo culture)
			{
				if(culture == null)
				{
					throw new ArgumentNullException("culture");
				}
				info = culture.TextInfo;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:8,代码来源:CaseInsensitiveHashCodeProvider.cs

示例5: MarkdownService

		public MarkdownService(IContentProvider contentProvider)
        {
            ContentProvider = contentProvider;

            _markdown = new MarkdownSharp.Markdown(CreateMarkdownOptions());

            _invariantTextInfo = CultureInfo.InvariantCulture.TextInfo;

			Tranformers = new Tranformers();
        }
开发者ID:ststeiger,项目名称:MarkdownReaderAndWriter,代码行数:10,代码来源:MarkdownService.cs

示例6: CompareProperties

	private void CompareProperties (TextInfo t1, TextInfo t2, bool compareReadOnly)
	{
		Assert.AreEqual (t1.ANSICodePage, t2.ANSICodePage, "ANSICodePage");
		Assert.AreEqual (t1.EBCDICCodePage, t2.EBCDICCodePage, "EBCDICCodePage");
		Assert.AreEqual (t1.ListSeparator, t2.ListSeparator, "ListSeparator");
		Assert.AreEqual (t1.MacCodePage, t2.MacCodePage, "MacCodePage");
		Assert.AreEqual (t1.OEMCodePage, t2.OEMCodePage, "OEMCodePage");
		Assert.AreEqual (t1.CultureName, t2.CultureName, "CultureName");
		if (compareReadOnly)
			Assert.AreEqual (t1.IsReadOnly, t2.IsReadOnly, "IsReadOnly");
//FIXME		Assert.AreEqual (t1.IsRightToLeft, t2.IsRightToLeft, "IsRightToLeft");
		Assert.AreEqual (t1.LCID, t2.LCID, "LCID");
	}
开发者ID:sushihangover,项目名称:playscript,代码行数:13,代码来源:TextInfoTest.cs

示例7: ResourceWriter

	// Constructors.
	public ResourceWriter(Stream stream)
			{
				if(stream == null)
				{
					throw new ArgumentNullException("stream");
				}
				else if(!stream.CanWrite)
				{
					throw new ArgumentException
						(_("IO_NotSupp_Write"), "stream");
				}
				this.stream = stream;
				generateDone = false;
				table = new Hashtable();
				ignoreCaseNames = new Hashtable();
				types = new ArrayList();
				info = CultureInfo.InvariantCulture.TextInfo;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:19,代码来源:ResourceWriter.cs

示例8: InInsertMacro

 public InInsertMacro()
 {
     textInfo = cultureInfo.TextInfo;
 }
开发者ID:neilmayhew,项目名称:pathway,代码行数:4,代码来源:InInsertMacro.cs

示例9: ButtonEx

        /// <summary>
        /// ���캯����
        /// </summary>
        public ButtonEx()
            : base(HtmlTextWriterTag.Input)
        {
            this.Width = new Unit("70px");
            this.CssClass = "ButtonFlat";

            this.textInfo = Thread.CurrentThread.CurrentCulture.TextInfo;
        }
开发者ID:jeasonyoung,项目名称:csharp_ipower,代码行数:11,代码来源:ButtonEx.cs

示例10: CultureInfo

        // Constructor called by SQL Server's special munged culture - creates a culture with
        // a TextInfo and CompareInfo that come from a supplied alternate source. This object
        // is ALWAYS read-only.
        // Note that we really cannot use an LCID version of this override as the cached
        // name we create for it has to include both names, and the logic for this is in
        // the GetCultureInfo override *only*.
        internal CultureInfo(String cultureName, String textAndCompareCultureName)
        {
            if (cultureName==null) {
                throw new ArgumentNullException("cultureName",
                    Environment.GetResourceString("ArgumentNull_String"));
            }
            Contract.EndContractBlock();

            this.m_cultureData = CultureData.GetCultureData(cultureName, false);
            if (this.m_cultureData == null)
                throw new CultureNotFoundException(
                    "cultureName", cultureName, Environment.GetResourceString("Argument_CultureNotSupported"));
            
            this.m_name = this.m_cultureData.CultureName;            

            CultureInfo altCulture = GetCultureInfo(textAndCompareCultureName);
            this.compareInfo = altCulture.CompareInfo;
            this.textInfo = altCulture.TextInfo;
        }
开发者ID:l1183479157,项目名称:coreclr,代码行数:25,代码来源:CultureInfo.cs

示例11: ReadOnly

		public static TextInfo ReadOnly (TextInfo textInfo)
		{
			if (textInfo == null)
				throw new ArgumentNullException ("textInfo");

			TextInfo ti = new TextInfo (textInfo);
			ti.m_isReadOnly = true;
			return ti;
		}
开发者ID:t-ashula,项目名称:mono,代码行数:9,代码来源:TextInfo.cs

示例12: TextInfo

		private TextInfo (TextInfo textInfo)
		{
			m_win32LangID = textInfo.m_win32LangID;
			m_nDataItem = textInfo.m_nDataItem;
			m_useUserOverride = textInfo.m_useUserOverride;
			m_listSeparator = textInfo.ListSeparator;
			customCultureName = textInfo.CultureName;
			ci = textInfo.ci;
			handleDotI = textInfo.handleDotI;
			data = textInfo.data;
		}
开发者ID:t-ashula,项目名称:mono,代码行数:11,代码来源:TextInfo.cs

示例13: AreEqual

		static bool AreEqual (TextInfo info, CultureInfo culture)
		{
#if !NET_2_1
			return info.LCID == culture.LCID;
#else
			return info.CultureName == culture.Name;
#endif
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:8,代码来源:CaseInsensitiveHashCodeProvider.cs

示例14: ReadOnly

 public static TextInfo ReadOnly(TextInfo textInfo) 
 {
     if (textInfo == null)       { throw new ArgumentNullException("textInfo"); }
     if (textInfo.IsReadOnly)    { return (textInfo); }
     
     TextInfo clonedTextInfo = (TextInfo)(textInfo.MemberwiseClone());
     clonedTextInfo.SetReadOnlyState(true);
     
     return (clonedTextInfo);
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:10,代码来源:textinfo.cs

示例15: ConstructInvariant

		private void ConstructInvariant (bool read_only)
		{
			cultureID = InvariantCultureId;

			/* NumberFormatInfo defaults to the invariant data */
			numInfo=NumberFormatInfo.InvariantInfo;

			if (!read_only) {
				numInfo = (NumberFormatInfo) numInfo.Clone ();
			}

			textInfo = CreateTextInfo (read_only);

			m_name=String.Empty;
			englishname=
			nativename="Invariant Language (Invariant Country)";
			iso3lang="IVL";
			iso2lang="iv";
			win3lang="IVL";
			default_calendar_type = 1 << CalendarTypeBits | (int) GregorianCalendarTypes.Localized;
		}
开发者ID:shana,项目名称:mono,代码行数:21,代码来源:CultureInfo.cs


注:本文中的System.Globalization.TextInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。