- Регистрация
- 10.05.2013
- Сообщения
- 101
- Благодарностей
- 8
- Баллы
- 18
Здравствуйте. Запускаю проект так:
Как можно передать ему значение переменной?
C#:
var task =
"<Id>"+project.Variables["name"].Value+"</Id>"+
"<Name>"+project.Variables["name"].Value+"</Name>"+
"<CreateTime>01/01/0001 00:00:00</CreateTime>"+
"<ExecutionSettings> "+
" <LimitOfThreads>"+project.Variables["maximum_potokov"].Value+"</LimitOfThreads>"+
" <MaxAllowOfThreads>0</MaxAllowOfThreads>"+
" <DoneSuccesfully>0</DoneSuccesfully>"+
" <DoneAll>0</DoneAll>"+
" <NumberOfTries>"+project.Variables["skolko_delat"].Value+"</NumberOfTries>"+
" <LastNumberOfTries>0</LastNumberOfTries>"+
" <Priority>50</Priority>"+
" <Proxy>DoNotUseProxy</Proxy>"+
" <Status>Newbie</Status>"+
" <ProxyLabels></ProxyLabels>"+
" <ShouldBeExecutedRandomly>False</ShouldBeExecutedRandomly>"+
" <GroupLabels>"+project.Variables["metka"].Value+"</GroupLabels>"+
" <GroupStates>Выполнены</GroupStates>"+
" <MaxNumOfSuccesStop>"+project.Variables["kolicestvo_uspehov"].Value+"</MaxNumOfSuccesStop>"+
" <MaxNumOfFailStop>"+project.Variables["kolichstvo_neyspehov"].Value+"</MaxNumOfFailStop>"+
" <NumOfFailStop>0</NumOfFailStop>"+
"</ExecutionSettings>"+
"<SchedulerSettings>"+
" <StartDate>01/01/0001 00:00:00</StartDate>"+
" <EndDate>01/01/0001 00:00:00</EndDate>"+
" <RepetitionCount>1</RepetitionCount>"+
" <ScheduleType>EveryMinutes</ScheduleType>"+
" <RepeatType>FinishAfter</RepeatType>"+
" <ActivateTime>01/01/0001 00:00:00</ActivateTime>"+
" <ActivateWorkTime>01/01/0001 00:00:00</ActivateWorkTime>"+
" <IsActive>False</IsActive>"+
" <NumberOfTries>0</NumberOfTries>"+
" <Minutes>1</Minutes>"+
" <Days>1</Days>"+
" <LastScheduleDate>01/01/0001 00:00:00</LastScheduleDate>"+
" <IsClearSucces>False</IsClearSucces>"+
"</SchedulerSettings>"+
"<Project>"+
" <ProjectFileLocation>"+project.Variables["patch"].Value+"</ProjectFileLocation>"+
" <ProjectType>Assembly</ProjectType>"+
"</Project>";
// Add the task
ZennoPoster.AddTask(task);