Implementing CodeCreator project in VS Solution?

  • Автор темы Автор темы Ambassy
  • Дата начала Дата начала

Ambassy

Client
Регистрация
10.10.2014
Сообщения
11
Реакции
0
Баллы
1
Basically I've written a CodeCreator project which I want to use as a class library in my Visual Studio solution.
I've imported the project and added the .dll files.
However I see that the 2 arguments:
Instance instance, IZennoPosterProjectModel project
are being added to the main method somehow.
How would I go about this is my solution where the ZP project isn't the startup project (but merely a class library project)?
 
You have to include these arguments if you wanna operate with instance or project objects.
 
You have to include these arguments if you wanna operate with instance or project objects.

Thanks for replying.
I know I have to include them but how would I create them?
IZennoPosterProjectModel is an interface so I need to know the concrete class in order to instantiate it.
Instance takes 3 arguments in its constructor (string url, int port, string address) - what do I input here?

I mean right now my class is implementing the ExecuteCode function in the following way:

Код:
Развернуть Свернуть Копировать
public class McManager : IZennoCustomCode
{
  Instance instance;
  IZennoPosterProjectModel project;
  public int ExecuteCode(Instance instance, IZennoPosterProjectModel project)
  {
  this.instance = instance;
  this.project = project;
  return 0;
  }
}

But how do I call ExecuteCode? I don't know how to instantiate neither of the arguments and it doesn't get called when I instantiate the class itself.
 
Последнее редактирование:
I cannot create project or instance objects within a code.
But you can develop your own dll in Visual Studio and use it in your projects with GAC + using.
 
I cannot create project or instance objects within a code.
But you can develop your own dll in Visual Studio and use it in your projects with GAC + using.

Alright I'm not familiar with GAC so I guess I will just setup a task in ZennoPoster which starts when a textfile is created (containing my arguments). Seems like the simplest solution to communicate between my custom program and my CodeCreator program.
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)