示例#1
0
 void ConvertPasConstDecl(PasConstDecl pasConst, CsClassTypeDecl csClass, bool isStatic)
 {
     var csField = new CsField();
     csField.Name = pasConst.Name;
     csField.Visibility = CsClassVisibility.Public;
     csField.TypeRef = ConvertPasTypeRef(pasConst.TypeRef);
     csField.IsConst = true;
     csField.IsStatic = isStatic;
     csField.InitialValue = CsValueOf(pasConst.Value);
     csClass.Decls.Add(csField);
     _associations.Assign(pasConst, csField);
 }
示例#2
0
 void ConvertPasConstDecl(PasConstDecl pasConst, CsNamespace csNamespace)
 {
     ConvertPasConstDecl(pasConst, NamespaceClass(csNamespace), true);
 }