public static void DestroyInstance() { lock (singletonMutex) { _libraryServices = null; } }
public static LibraryServices GetInstance() { lock (singletonMutex) { return(_libraryServices ?? (_libraryServices = new LibraryServices())); } }
public EngineController(DynamoModel dynamoModel, string geometryFactoryFileName) { this.dynamoModel = dynamoModel; // Create a core which is used for parsing code and loading libraries libraryCore = new ProtoCore.Core(new Options() { RootCustomPropertyFilterPathName = string.Empty }); libraryCore.Executives.Add(Language.kAssociative, new ProtoAssociative.Executive(libraryCore)); libraryCore.Executives.Add(Language.kImperative, new ProtoImperative.Executive(libraryCore)); libraryCore.ParsingMode = ParseMode.AllowNonAssignment; libraryServices = new LibraryServices(libraryCore); libraryServices.LibraryLoading += this.LibraryLoading; libraryServices.LibraryLoadFailed += this.LibraryLoadFailed; libraryServices.LibraryLoaded += this.LibraryLoaded; liveRunnerServices = new LiveRunnerServices(dynamoModel, this, geometryFactoryFileName); liveRunnerServices.ReloadAllLibraries(libraryServices.ImportedLibraries); codeCompletionServices = new CodeCompletionServices(LiveRunnerCore); astBuilder = new AstBuilder(dynamoModel, this); syncDataManager = new SyncDataManager(); dynamoModel.NodeDeleted += NodeDeleted; }
public EngineController(LibraryServices libraryServices, string geometryFactoryFileName, bool verboseLogging) { this.libraryServices = libraryServices; libraryServices.LibraryLoaded += LibraryLoaded; liveRunnerServices = new LiveRunnerServices(this, geometryFactoryFileName); liveRunnerServices.ReloadAllLibraries(libraryServices.ImportedLibraries); codeCompletionServices = new CodeCompletionServices(LiveRunnerCore); astBuilder = new AstBuilder(this); syncDataManager = new SyncDataManager(); VerboseLogging = verboseLogging; }
public EngineController(DynamoModel dynamoModel, string geometryFactoryFileName) { this.dynamoModel = dynamoModel; libraryServices = LibraryServices.GetInstance(); libraryServices.LibraryLoading += this.LibraryLoading; libraryServices.LibraryLoadFailed += this.LibraryLoadFailed; libraryServices.LibraryLoaded += this.LibraryLoaded; liveRunnerServices = new LiveRunnerServices(dynamoModel, this, geometryFactoryFileName); liveRunnerServices.ReloadAllLibraries(libraryServices.Libraries.ToList()); astBuilder = new AstBuilder(dynamoModel, this); syncDataManager = new SyncDataManager(); dynamoModel.NodeDeleted += NodeDeleted; }
public EngineController(DynamoController controller) { libraryServices = LibraryServices.GetInstance(); libraryServices.LibraryLoading += this.LibraryLoading; libraryServices.LibraryLoadFailed += this.LibraryLoadFailed; libraryServices.LibraryLoaded += this.LibraryLoaded; liveRunnerServices = new LiveRunnerServices(this); liveRunnerServices.ReloadAllLibraries(libraryServices.Libraries.ToList()); astBuilder = new AstBuilder(this); syncDataManager = new SyncDataManager(); this.controller = controller; this.controller.DynamoModel.NodeDeleted += NodeDeleted; this.controller.CustomNodeManager.RecompileAllNodes(this); }
/// <summary> /// Import library. /// </summary> /// <param name="library"></param> public void ImportLibrary(string library) { LibraryServices.ImportLibrary(library); }