Esempio n. 1
0
 public void SetValue(object target, object value)
 {
     // Make sure the default value is cloned since arrays are not truly read only.
     if (value != null && object.ReferenceEquals(value, defaultValue))
     {
         value = defaultValue.Clone();
     }
     baseProvider.SetValue(target, value);
 }
Esempio n. 2
0
        protected static IList <string> TranslateTokenStringsToTarget(string[] tokenStrings, OutputModelFactory factory)
        {
            string[] result = (string[])tokenStrings.Clone();
            for (int i = 0; i < tokenStrings.Length; i++)
            {
                result[i] = TranslateTokenStringToTarget(tokenStrings[i], factory);
            }

            int lastTrueEntry = result.Length - 1;

            while (lastTrueEntry >= 0 && result[lastTrueEntry] == null)
            {
                lastTrueEntry--;
            }

            if (lastTrueEntry < result.Length - 1)
            {
                Array.Resize(ref result, lastTrueEntry + 1);
            }

            return(result);
        }
Esempio n. 3
0
 public virtual object Clone()
 {
     return(new BitSet((ulong[])_bits.Clone()));
 }