LedgerAccounts_PluginConsumer.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using Sage.API.OnPremise.Accounts.Contracts.Interfaces.V1;
6 //using Sage.API.OnPremise.Accounts.Contracts.V1.v0;
7 
8 namespace sage.ew.conta.plugins
9 {
13  internal class LedgerAccounts_PluginConsumer : PluginConsumer, IPluginOperations<ILedgerAccount>
14  {
15  private const string _cAssemblyNameLedgerAccount = "Sage.API.OnPremise.Accountant.Plugins.dll"; //"Sage.API.OnPremise.Accounts.dll";
16  private const string _cPluginNameLedgerAccount = "Sage.API.OnPremise.Accounts.Plugins";
17  private const string _cClassNameLedgerAccount = "Sage.API.OnPremise.Accounts.Plugins.LedgerAccountsPlugins";
18 
19  //Utilizo el construtor con parĂ¡metros de la base y le asigno las constantes del pluguin
23  public LedgerAccounts_PluginConsumer()
24  : base (_cAssemblyNameLedgerAccount, _cPluginNameLedgerAccount, _cClassNameLedgerAccount)
25  {
26 
27  }
28 
29  public void _SetAssemblyPath(string tcAssemblyPath)
30  {
31  CanviarPath(tcAssemblyPath);
32  }
33 
39  public ILedgerAccount _Add(object[] toParametros)
40  {
41  return (ILedgerAccount)InvokeMethod(ePluginOperation.Add, toParametros);
42  }
43 
49  public ILedgerAccount _Update(object[] toParametros)
50  {
51  return (ILedgerAccount)InvokeMethod(ePluginOperation.Update, toParametros);
52  }
53 
59  public bool _Delete(object[] toParametros)
60  {
61  return (bool)InvokeMethod(ePluginOperation.Delete, toParametros);
62  }
63 
69  public ILedgerAccount _Get(object[] toParametros)
70  {
71  return (ILedgerAccount)InvokeMethod(ePluginOperation.Get, toParametros);
72  }
73 
74 
75  public IEnumerable<ILedgerAccount> _GetList(object[] toParametros)
76  {
77  throw new NotImplementedException();
78  }
79 
80  public object _Action(object[] toParametros)
81  {
82  throw new NotImplementedException();
83  }
84  }
85 }
ePluginOperation
Operaciones disponibles por cada plugin