private ExtensionPointRepresentation Describe(PluginPoint extension) { ExtensionPointRepresentation representation = new ExtensionPointRepresentation(extension.Name(), extension.ForType(), extension.Description); extension.DescribeParameters(representation); return(representation); }
private static void Add(IDictionary <string, PluginPoint> extensions, PluginPoint plugin) { if (extensions[plugin.Name()] != null) { throw new System.ArgumentException("This plugin already has an plugin point with the name \"" + plugin.Name() + "\""); } extensions[plugin.Name()] = plugin; }
internal void AddExtension(Type type, PluginPoint plugin) { IDictionary <string, PluginPoint> ext = _targetToPluginMap[type]; if (ext == null) { throw new System.InvalidOperationException("Cannot extend " + type); } Add(ext, plugin); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: PluginPoint getExtensionPoint(Class type, String method) throws PluginLookupException internal PluginPoint GetExtensionPoint(Type type, string method) { IDictionary <string, PluginPoint> ext = _targetToPluginMap[type]; PluginPoint plugin = null; if (ext != null) { plugin = ext[method]; } if (plugin == null) { throw new PluginLookupException("No plugin \"" + method + "\" for " + type); } return(plugin); }
public override Representation Invoke <T>(GraphDatabaseAPI graphDb, string name, Type type, string method, T context, ParameterList @params) { type = typeof(T); PluginPoint plugin = Extension(name, type, method); try { return(plugin.Invoke(graphDb, context, @params)); } catch (Exception e) when(e is BadInputException || e is PluginInvocationFailureException || e is BadPluginInvocationException) { throw e; } catch (Exception e) { throw new PluginInvocationFailureException(e); } }
public void AddRelationshipExtensions(PluginPoint plugin) { Add(_targetToPluginMap[typeof(Relationship)], plugin); }
public void AddNodeExtensions(PluginPoint plugin) { Add(_targetToPluginMap[typeof(Node)], plugin); }
public void AddGraphDatabaseExtensions(PluginPoint plugin) { Add(_targetToPluginMap[typeof(GraphDatabaseService)], plugin); }