//[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); } }
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); } }