Esempio n. 1
0
 /// <summary>
 /// �������ͱ�������
 /// </summary>
 /// <param name="key">���ͱ���ע������</param>
 /// <param name="typeAlias">���ͱ�������</param>
 public void AddTypeAlias(TypeAlias typeAlias)
 {
     ValidateTypeAlias(typeAlias);
     if (_typeAliasMaps.ContainsKey(typeAlias.AliasName) == true)
     {
         throw new Exception(" Alias name conflict occurred.  The type alias '" + typeAlias.AliasName + "' is already mapped to the value '" + typeAlias.ClassName + "'.");
     }
     _typeAliasMaps.Add(typeAlias.AliasName, typeAlias);
 }
Esempio n. 2
0
 private void ValidateTypeAlias(TypeAlias typeAlias)
 {
     if (typeAlias == null)
     {
         throw new FireSpiderException("ʵ�弯��Ϊ�գ�������ӵ�ʵ�弯���б��б��");
     }
     if (string.IsNullOrEmpty(typeAlias.AliasName))
     {
         throw new FireSpiderException("ʵ�弯������Ϊ�գ�");
     }
 }
Esempio n. 3
0
 /// <summary>
 /// �������ͱ�����
 /// </summary>
 /// <param name="aliasName"></param>
 /// <param name="classType"></param>
 /// <returns></returns>
 public TypeAlias CreateTypeAlias(string aliasName, Type classType)
 {
     TypeAlias typeAlias = new TypeAlias(this);
     typeAlias.AliasName = aliasName;
     typeAlias.ClassType = classType;
     return typeAlias;
 }
 public void Remove(TypeAlias typeAlias)
 {
     InnerList.Remove(typeAlias);
 }
 public void Insert(int index, TypeAlias typeAlias)
 {
     InnerList.Insert(index, typeAlias);
 }
 public void Add(TypeAlias typeAlias)
 {
     InnerList.Add(typeAlias);
 }