當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。