Exemple #1
0
 public void AddTypeParamInfo(TypeParamInfo typeParamInfo)
 {
     lock (_typeParamInfos)
     {
         int capacity = 1;
         if (_typeParamInfos != null)
         {
             capacity = _typeParamInfos.Length + 1;
         }
         TypeParamInfo[] tmp = new TypeParamInfo[capacity];
         if (_typeParamInfos != null)
         {
             _typeParamInfos.CopyTo(tmp, 0);
         }
         tmp[capacity - 1] = typeParamInfo;
         _typeParamInfos   = tmp;
     }
 }
Exemple #2
0
        internal bool TrySetTypeParam(object item)
        {
            bool      result = false;
            typeparam param  = item as typeparam;

            if (param != null)
            {
                result = true;

                StringBuilder txt = new StringBuilder();
                param.Text.Each(s =>
                {
                    txt.Append(s);
                });

                TypeParamInfo info = new TypeParamInfo();
                info.Description = txt.ToString();
                info.Name        = param.name;
                AddTypeParamInfo(info);
            }

            return(result);
        }