コード例 #1
0
        //[MenuItem("General /Typescript/Generate Binders")]
        //static private void GenerateBinders()
        //{
        //	generateBinders(pickTypes());
        //}

        //[MenuItem("General/Typescript/Generate Binders Subset")]
        //static private void GenerateBindersSubset()
        //{
        //	generateBinders(pickTypes(true));
        //}

        static private void generateSnippet(Type type)
        {
            try
            {
                NamespaceBinder space = NamespaceBinder.GetNamespace(type.FullName.Substring(0, type.FullName.LastIndexOf(".")));
                if (null != space)
                {
                    space.DeclareClass(type);
                }
            }
            catch (Exception e)
            {
                Entry.LogError(e);
                Entry.LogWarning(type);
            }
        }
コード例 #2
0
 static private void generateBinder(Type type)
 {
     if (!type.FullName.Contains("."))
     {
         return;
     }
     try
     {
         NamespaceBinder space = NamespaceBinder.GetNamespace(type.FullName.Substring(0, type.FullName.LastIndexOf(".")));
         if (null != space)
         {
             space.DeclareClass(type);
         }
     }
     catch (Exception e)
     {
         Entry.LogError(e);
         Entry.LogError(type);
     }
 }