SetReadOnlyState() private method

private SetReadOnlyState ( bool readOnly ) : void
readOnly bool
return void
コード例 #1
0
ファイル: CultureInfo.cs プロジェクト: sigma-random/mono
        private unsafe TextInfo CreateTextInfo(bool readOnly)
        {
            TextInfo tempTextInfo = new TextInfo(this.m_cultureData);

            tempTextInfo.SetReadOnlyState(readOnly);
            return(tempTextInfo);
        }
コード例 #2
0
        ////////////////////////////////////////////////////////////////////////
        //
        //  ReadOnly
        //
        //  Create a cloned readonly instance or return the input one if it is 
        //  readonly.
        //
        ////////////////////////////////////////////////////////////////////////
        public static TextInfo ReadOnly(TextInfo textInfo)
        {
            if (textInfo == null) { throw new ArgumentNullException(nameof(textInfo)); }
            Contract.EndContractBlock();
            if (textInfo.IsReadOnly) { return (textInfo); }

            TextInfo clonedTextInfo = (TextInfo)(textInfo.MemberwiseClone());
            clonedTextInfo.SetReadOnlyState(true);

            return (clonedTextInfo);
        }
コード例 #3
0
ファイル: TextInfo.cs プロジェクト: Kykenk/runtime
        /// <summary>
        /// Create a cloned readonly instance or return the input one if it is
        /// readonly.
        /// </summary>
        public static TextInfo ReadOnly(TextInfo textInfo)
        {
            ArgumentNullException.ThrowIfNull(textInfo);

            if (textInfo.IsReadOnly)
            {
                return(textInfo);
            }

            TextInfo clonedTextInfo = (TextInfo)(textInfo.MemberwiseClone());

            clonedTextInfo.SetReadOnlyState(true);
            return(clonedTextInfo);
        }
コード例 #4
0
        public static TextInfo ReadOnly(TextInfo textInfo)
        {
            if (textInfo == null)
            {
                throw new ArgumentNullException("textInfo");
            }
            if (textInfo.IsReadOnly)
            {
                return(textInfo);
            }
            TextInfo textInfo2 = (TextInfo)textInfo.MemberwiseClone();

            textInfo2.SetReadOnlyState(true);
            return(textInfo2);
        }
コード例 #5
0
        public static TextInfo ReadOnly(TextInfo textInfo)
        {
            if (textInfo == null)
            {
                throw new ArgumentNullException("textInfo");
            }
            if (textInfo.IsReadOnly)
            {
                return(textInfo);
            }
            TextInfo textInfo1 = (TextInfo)textInfo.MemberwiseClone();
            int      num       = 1;

            textInfo1.SetReadOnlyState(num != 0);
            return(textInfo1);
        }
コード例 #6
0
ファイル: CultureInfo.cs プロジェクト: razzfazz/mono
		private unsafe TextInfo CreateTextInfo (bool readOnly)
		{
			TextInfo tempTextInfo = new TextInfo (this.m_cultureData);
			tempTextInfo.SetReadOnlyState (readOnly);
			return tempTextInfo;
		}