CodeCreator - C# : Can I create IZennoPosterProjectModel variable ?

PapyRef

Client
Регистрация
28.02.2012
Сообщения
70
Благодарностей
6
Баллы
0
In C#, I'd like to create a variable using IZennoPosterProjectModel interface.
Is it possible?

Код:
        /// <summary>
        /// Method to run the code
        /// </summary>
        /// <param name="instance">Object of instance is allocated to this script</param>
        /// <param name="instance">Object of project is allocated to this script</param>
        /// <returns> the return code </returns>
        public int ExecuteCode(Instance instance, IZennoPosterProjectModel project)
        {
            int executionResult = 0;

    ==>> IZennoPosterProjectModel SaveProject = ??????;
            SaveProject = project;
            SaveProject.Profile.Email = [COLOR=#800000]"[email protected]"[/COLOR];

            // Perform action group ActionGroup1
            executionResult = ActionGroup1.Execute(instance, SaveProject);

            return executionResult;
        }
 

shade

Client
Регистрация
19.11.2010
Сообщения
580
Благодарностей
346
Баллы
63
In C#, I'd like to create a variable using IZennoPosterProjectModel interface.
Is it possible?

Код:
        /// <summary>
        /// Method to run the code
        /// </summary>
        /// <param name="instance">Object of instance is allocated to this script</param>
        /// <param name="instance">Object of project is allocated to this script</param>
        /// <returns> the return code </returns>
        public int ExecuteCode(Instance instance, IZennoPosterProjectModel project)
        {
            int executionResult = 0;

    ==>> IZennoPosterProjectModel SaveProject = ??????;
            SaveProject = project;
            SaveProject.Profile.Email = [COLOR=#800000]"[email protected]"[/COLOR];

            // Perform action group ActionGroup1
            executionResult = ActionGroup1.Execute(instance, SaveProject);

            return executionResult;
        }
Only if you define a new class inherited from the interface IZennoPosterProjectModel and implement all methods and properties. But impossible to create a new object of IZennoPosterProjectModel, it is interface but not class. There is not such classes and constructors.
 

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