Esempio n. 1
0
        private ITaskTemplate CreateTaskTemplate(ITask task)
        {
            TaskTemplateData taskTemplate = new TaskTemplateData
            {
                Name                 = task.Name,
                MediaProcessorId     = task.MediaProcessorId,
                Configuration        = task.Configuration,
                EncryptionKeyId      = task.EncryptionKeyId,
                EncryptionScheme     = task.EncryptionScheme,
                EncryptionVersion    = task.EncryptionVersion,
                InitializationVector = task.InitializationVector,
                TaskInputs           = task.InputAssets.ToArray(),
                TaskOutputs          = task.OutputAssets.ToArray(),
                NumberofInputAssets  = task.InputAssets.Count,
                NumberofOutputAssets = task.OutputAssets.Count,
                Options              = (int)task.Options,
                TaskTemplateBody     = task.TaskBody
            };

            taskTemplate.InitCloudMediaContext(this._cloudMediaContext);

            return(taskTemplate);
        }
        /// <summary>
        /// Copies this instance.
        /// </summary>
        /// <returns>The task template copy.</returns>
        internal TaskTemplateData Copy()
        {
            TaskTemplateData templateData = new TaskTemplateData
            {
                Name                 = this.Name,
                MediaProcessorId     = this.MediaProcessorId,
                Configuration        = this.Configuration,
                ConfigurationCopied  = this.Configuration,
                EncryptionKeyId      = this.EncryptionKeyId,
                EncryptionScheme     = this.EncryptionScheme,
                EncryptionVersion    = this.EncryptionVersion,
                InitializationVector = this.InitializationVector,
                TaskInputs           = this.TaskInputs,
                TaskOutputs          = this.TaskOutputs,
                NumberofInputAssets  = this.NumberofInputAssets,
                NumberofOutputAssets = this.NumberofOutputAssets,
                Options              = (int)this.Options,
                TaskTemplateBody     = this.TaskTemplateBody
            };

            templateData.InitCloudMediaContext(this._cloudMediaContext);

            return(templateData);
        }
        /// <summary>
        /// Copies this instance.
        /// </summary>
        /// <returns>The task template copy.</returns>
        internal TaskTemplateData Copy()
        {
            TaskTemplateData templateData = new TaskTemplateData
            {
                Name = this.Name,
                MediaProcessorId = this.MediaProcessorId,
                Configuration = this.Configuration,
                ConfigurationCopied = this.Configuration,
                EncryptionKeyId = this.EncryptionKeyId,
                EncryptionScheme = this.EncryptionScheme,
                EncryptionVersion = this.EncryptionVersion,
                InitializationVector = this.InitializationVector,
                TaskInputs = this.TaskInputs,
                TaskOutputs = this.TaskOutputs,
                NumberofInputAssets = this.NumberofInputAssets,
                NumberofOutputAssets = this.NumberofOutputAssets,
                Options = (int)this.Options,
                TaskTemplateBody = this.TaskTemplateBody
            };

            templateData.InitCloudMediaContext(this._cloudMediaContext);

            return templateData;
        }
        private ITaskTemplate CreateTaskTemplate(ITask task)
        {
            TaskTemplateData taskTemplate = new TaskTemplateData
                {
                    Name = task.Name,
                    MediaProcessorId = task.MediaProcessorId,
                    Configuration = task.Configuration,
                    EncryptionKeyId = task.EncryptionKeyId,
                    EncryptionScheme = task.EncryptionScheme,
                    EncryptionVersion = task.EncryptionVersion,
                    InitializationVector = task.InitializationVector,
                    TaskInputs = task.InputAssets.ToArray(),
                    TaskOutputs = task.OutputAssets.ToArray(),
                    NumberofInputAssets = task.InputAssets.Count,
                    NumberofOutputAssets = task.OutputAssets.Count,
                    Options = (int)task.Options,
                    TaskTemplateBody = task.TaskBody
                };

            taskTemplate.InitCloudMediaContext(this._cloudMediaContext);

            return taskTemplate;
        }