public ICollection <INamespaceItem> FetchNamespacesWithJsonRetunrs(IPluginSource source) { var serializer = new Dev2JsonSerializer(); var comsController = CommunicationControllerFactory.CreateController("FetchPluginNameSpaces"); comsController.AddPayloadArgument(nameof(source), serializer.SerializeToBuilder(source)); comsController.AddPayloadArgument("fetchJson", new StringBuilder(true.ToString())); var workspaceId = Connection.WorkspaceID; var payload = comsController.ExecuteCommand <ExecuteMessage>(Connection, workspaceId); if (payload == null || payload.HasError) { if (!Connection.IsConnected) { ShowServerDisconnectedPopup(); return(new List <INamespaceItem>()); } if (payload != null) { throw new WarewolfSupportServiceException(payload.Message.ToString(), null); } throw new WarewolfSupportServiceException(ErrorResource.ServiceDoesNotExist, null); } return(serializer.Deserialize <List <INamespaceItem> >(payload.Message)); }
public IList <IPluginAction> PluginActionsWithReturns(IPluginSource source, INamespaceItem ns) { var serializer = new Dev2JsonSerializer(); var comsController = CommunicationControllerFactory.CreateController("FetchPluginActionsWithReturnsTypes"); var pluginActions = GetPluginActions(source, ns, comsController, serializer); return(pluginActions); }
public static List <Type> GetModulesWithAllDependencies(this IPluginSource plugInSource) { return(plugInSource .GetModules() .SelectMany(DinazorModule.FindDependedModuleTypesRecursivelyIncludingGivenModule) .Distinct() .ToList()); }
public bool Equals(IPluginSource other) { // ReSharper disable once PossibleNullReferenceException return(string.Equals(Name, other.Name) && string.Equals(Path, other.Path) && string.Equals(ConfigFilePath, other.ConfigFilePath) && string.Equals(FileSystemAssemblyName, other.FileSystemAssemblyName) && string.Equals(GACAssemblyName, other.GACAssemblyName)); }
public bool Equals(IPluginSource other) { var equals = true; equals &= string.Equals(Name, other.Name); equals &= string.Equals(Path, other.Path); equals &= string.Equals(ConfigFilePath, other.ConfigFilePath); equals &= string.Equals(FileSystemAssemblyName, other.FileSystemAssemblyName); equals &= string.Equals(GACAssemblyName, other.GACAssemblyName); return(equals); }
public void SavePluginSource(IPluginSource source, Guid serverWorkspaceID) { var con = Connection; var comsController = CommunicationControllerFactory.CreateController("SavePluginSource"); var serialiser = new Dev2JsonSerializer(); comsController.AddPayloadArgument("PluginSource", serialiser.SerializeToBuilder(source)); var output = comsController.ExecuteCommand <IExecuteMessage>(con, GlobalConstants.ServerWorkspaceID); if (output.HasError) { throw new WarewolfSaveException(output.Message.ToString(), null); } }
/// <summary> /// Adds a plugin source to the repository. /// </summary> /// <param name="source">The source.</param> /// <exception cref="System.ArgumentNullException">source</exception> /// <exception cref="System.ArgumentException">Source already added</exception> public void AddPluginSource(IPluginSource source) { if (source == null) throw new ArgumentNullException("source"); if (this.sources.Contains(source)) throw new ArgumentException(Resources.SourceAlreadyAdded); source.PluginAdded += this.OnPluginAdded; source.PluginRemoved += this.OnPluginRemoved; this.sources.Add(source); this.log.Debug(Resources.SourceAdded, source.GetType().FullName); }
/// <summary> /// Removes a plugin source from the repository. /// </summary> /// <param name="source">The source.</param> public void RemovePluginSource(IPluginSource source) { if (source == null) { throw new ArgumentNullException("source"); } if (!this.sources.Contains(source)) { throw new ArgumentException(Resources.UnknownSource); } this.sources.Remove(source); source.PluginAdded -= this.OnPluginAdded; source.PluginRemoved -= this.OnPluginRemoved; this.log.Debug(Resources.SourceRemoved, source.GetType().FullName); }
/// <summary> /// Adds a plugin source to the repository. /// </summary> /// <param name="source">The source.</param> /// <exception cref="System.ArgumentNullException">source</exception> /// <exception cref="System.ArgumentException">Source already added</exception> public void AddPluginSource(IPluginSource source) { if (source == null) { throw new ArgumentNullException("source"); } if (this.sources.Contains(source)) { throw new ArgumentException(Resources.SourceAlreadyAdded); } source.PluginAdded += this.OnPluginAdded; source.PluginRemoved += this.OnPluginRemoved; this.sources.Add(source); this.log.Debug(Resources.SourceAdded, source.GetType().FullName); }
public IList <IPluginConstructor> PluginConstructors(IPluginSource source, INamespaceItem ns) { Dev2JsonSerializer serializer = new Dev2JsonSerializer(); var comsController = CommunicationControllerFactory.CreateController("FetchPluginConstructors"); comsController.AddPayloadArgument("source", serializer.SerializeToBuilder(source)); comsController.AddPayloadArgument("namespace", serializer.SerializeToBuilder(ns)); var workspaceId = Connection.WorkspaceID; var result = comsController.ExecuteCommand <ExecuteMessage>(Connection, workspaceId); if (result == null || result.HasError) { if (!Connection.IsConnected) { ShowServerDisconnectedPopup(); return(new List <IPluginConstructor>()); } if (result != null) { throw new WarewolfSupportServiceException(result.Message.ToString(), null); } throw new WarewolfSupportServiceException(ErrorResource.ServiceDoesNotExist, null); } var pluginConstructors = serializer.Deserialize <List <IPluginConstructor> >(result.Message.ToString()); if (DataListSingleton.ActiveDataList != null) { if (DataListSingleton.ActiveDataList.ComplexObjectCollection != null) { var objectCollection = DataListSingleton.ActiveDataList.ComplexObjectCollection; pluginConstructors.AddRange(objectCollection.Select(objectItemModel => new PluginConstructor() { ConstructorName = objectItemModel.Name, IsExistingObject = true })); } } return(pluginConstructors); }
IList <IPluginAction> GetPluginActions(IPluginSource source, INamespaceItem ns, ICommunicationController comsController, Dev2JsonSerializer serializer) { comsController.AddPayloadArgument(nameof(source), serializer.SerializeToBuilder(source)); comsController.AddPayloadArgument("namespace", serializer.SerializeToBuilder(ns)); var workspaceId = Connection.WorkspaceID; var result = comsController.ExecuteCommand <ExecuteMessage>(Connection, workspaceId); if (result == null || result.HasError) { if (!Connection.IsConnected) { ShowServerDisconnectedPopup(); return(new List <IPluginAction>()); } if (result != null) { throw new WarewolfSupportServiceException(result.Message.ToString(), null); } throw new WarewolfSupportServiceException(ErrorResource.ServiceDoesNotExist, null); } return(serializer.Deserialize <List <IPluginAction> >(result.Message.ToString())); }
public ICollection <IPluginConstructor> GetConstructors(IPluginSource source, INamespaceItem value) => _queryProxy.PluginConstructors(source, value).ToList();
public void Save(IPluginSource source) => UpdateManagerProxy.SavePluginSource(source, GlobalConstants.ServerWorkspaceID);
public PluginProvider(IPluginSource source) { Contract.Requires(source != null); this.source = source; }
public ICollection <IPluginConstructor> GetConstructors(IPluginSource source, INamespaceItem ns) { return(_queryProxy.PluginConstructors(source, ns).ToList()); }
public void Save(IPluginSource source) { _updateRepository.Save(source); }
public void EditSource(IPluginSource selectedSource) { _shell.EditResource(selectedSource); }
public ICollection <INamespaceItem> GetNameSpaces(IPluginSource source) { return(_queryProxy.FetchNamespaces(source)); }
public ICollection <INamespaceItem> GetNameSpacesWithJsonRetunrs(IPluginSource source) => _queryProxy.FetchNamespacesWithJsonRetunrs(source);
/// <summary> /// Removes a plugin source from the repository. /// </summary> /// <param name="source">The source.</param> public void RemovePluginSource(IPluginSource source) { if (source == null) throw new ArgumentNullException("source"); if (!this.sources.Contains(source)) throw new ArgumentException(Resources.UnknownSource); this.sources.Remove(source); source.PluginAdded -= this.OnPluginAdded; source.PluginRemoved -= this.OnPluginRemoved; this.log.Debug(Resources.SourceRemoved, source.GetType().FullName); }
public ICollection <IPluginAction> GetActionsWithReturns(IPluginSource source, INamespaceItem ns) => _queryProxy.PluginActionsWithReturns(source, ns).Where(a => a.Method != "GetType").ToList();
public bool Equals(IPluginSource other) => string.Equals(Name, other.Name) && string.Equals(Path, other.Path) && string.Equals(ConfigFilePath, other.ConfigFilePath) && string.Equals(FileSystemAssemblyName, other.FileSystemAssemblyName) && string.Equals(GACAssemblyName, other.GACAssemblyName);
public void Save(IPluginSource toDbSource) { _updateRepository.Save(toDbSource); }