Ejemplo n.º 1
0
        /// <summary>
        /// Renders the script for a given target control
        /// </summary>
        /// <param name="writer">The text writer</param>
        /// <param name="targetControl">The control being extended</param>


        private void RenderProfileBindings()
        {
            string profileComponent    = null;
            bool   startElementWritten = false;

            foreach (ProfilePropertyBinding profileItem in ProfileBindings)
            {
                if (profileComponent == null)
                {
                    IScriptService profileService = EnsureProfileScriptService(ScriptManager.GetCurrent(Page), true);
                    Sys.Debug.assert(profileService != null, "Failed to get ProfileScriptService");
                    profileComponent = profileService.ID;
                }

                if (!startElementWritten)
                {
                    startElementWritten = true;
                    writer.WriteStartElement("bindings");
                }


                writer.WriteStartElement("binding");
                Sys.Debug.assert(!string.IsNullOrEmpty(profileItem.ProfilePropertyName), "Property Name is null or empty");

                writer.WriteAttributeString("dataPath", profileItem.ProfilePropertyName);
                writer.WriteAttributeString("dataContext", profileComponent);

                string propertyName = profileItem.ExtenderPropertyName;

                Sys.Debug.assert(!string.IsNullOrEmpty(propertyName), "Property Name is null or empty");

                if (propertyName != null)
                {
                    PropertyDescriptor pd = TypeDescriptor.GetProperties(props)[propertyName];

                    if (pd == null)
                    {
                        throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, "Can't find property '{0}' to bind to.  Check the value of ExtenderPropertyName.", propertyName));
                    }

                    ClientPropertyNameAttribute displayName = (ClientPropertyNameAttribute)pd.Attributes[typeof(ClientPropertyNameAttribute)];
                    if (displayName != null && !displayName.IsDefaultAttribute())
                    {
                        propertyName = displayName.PropertyName;
                    }

                    writer.WriteAttributeString("property", propertyName);

                    writer.WriteAttributeString("direction", "InOut");
                }


                writer.WriteEndElement();
            }

            if (startElementWritten)
            {
                writer.WriteEndElement();
            }
        }
Ejemplo n.º 2
0
        public ScriptController(IScriptService scriptService,
            IScriptMapper scriptMapper, ICookieParser cookieParser)
        {
            _scriptService = scriptService;
            _scriptMapper = scriptMapper;
	        _cookieParser = cookieParser;
        }
 /// <summary>
 ///     Initializes a new instance of the <see cref="DeploymentService" /> class.
 /// </summary>
 /// <param name="configurationService">The configuration Service.</param>
 /// <param name="scriptService">The script Service.</param>
 /// <param name="fileService">The file Service.</param>
 /// <param name="scriptMessageFormatter">The script formatter for messages</param>
 public DeploymentService(IConfigurationService configurationService, IScriptService scriptService, IFileService fileService, IScriptMessageFormatter scriptMessageFormatter)
 {
     this.configurationService   = configurationService;
     this.scriptService          = scriptService;
     this.fileService            = fileService;
     this.scriptMessageFormatter = scriptMessageFormatter;
 }
 public ScriptController(IScriptService scriptService,
                         IScriptMapper scriptMapper, ICookieParser cookieParser)
 {
     _scriptService = scriptService;
     _scriptMapper  = scriptMapper;
     _cookieParser  = cookieParser;
 }
Ejemplo n.º 5
0
 public RunPreProcessToConnectionScriptsService(
     IScriptService scriptService,
     ILogger <RunPreProcessToConnectionScriptsService> logger)
 {
     _scriptService = scriptService;
     _logger        = logger;
 }
Ejemplo n.º 6
0
        public PatchListViewModel(IScriptService scriptService)
        {
            // Injection
            _scriptService = scriptService;

            // Initialization
            PatchList = new ObservableCollection <PatchItem>();
        }
Ejemplo n.º 7
0
 /// <inheritdoc />
 public HeartbeatSystem(EntityWorld world,
                        IScriptService scriptService)
     : base(Aspect.All(typeof(Heartbeat),
                       typeof(ScriptGroup)))
 {
     _world         = world;
     _scriptService = scriptService;
 }
 public PresentationController(IPresentationParser presentationParser,
                               IScriptService scriptService, IScriptMapper scriptMapper, ICookieParser cookieParser)
 {
     _presentationParser = presentationParser;
     _scriptService      = scriptService;
     _scriptMapper       = scriptMapper;
     _cookieParser       = cookieParser;
 }
		public PresentationController(IPresentationParser presentationParser,
			IScriptService scriptService, IScriptMapper scriptMapper, ICookieParser cookieParser)
		{
			_presentationParser = presentationParser;
			_scriptService = scriptService;
			_scriptMapper = scriptMapper;
			_cookieParser = cookieParser;
		}
 public ConsoleClientGenerator(
     IScriptService service,
     IExporter exporter,
     ILogger <ConsoleClientGenerator> logger)
 {
     _service  = service;
     _exporter = exporter;
     _logger   = logger;
 }
Ejemplo n.º 11
0
 public AdminController(IServicesManager servicesManager, IScriptService scriptService,
                        IComponentsService componentsService, IUserInteractionService userInteractionService,
                        ISchedulerService schedulerService)
 {
     _userInteractionService = userInteractionService;
     _servicesManager        = servicesManager;
     _scriptService          = scriptService;
     _componentsService      = componentsService;
     _schedulerService       = schedulerService;
 }
Ejemplo n.º 12
0
 public TaskController(ILogger <TaskController> logger,
                       IConfiguration configuration,
                       IScriptService scriptService,
                       IAnalysisRepository analysisRepository)
 {
     _logger             = logger;
     _configuration      = configuration;
     _scriptService      = scriptService;
     _analysisRepository = analysisRepository;
 }
Ejemplo n.º 13
0
        public TodoExplorerManager(
            IServerGateway serverGateway,
            IScriptService scriptService,
            ITodoPatternService todoPatternService)
        {
            _serverGateway      = serverGateway;
            _scriptService      = scriptService;
            _todoPatternService = todoPatternService;

            _databaseExclusionList = Resources.Database_ExclusionList.Split(',');
        }
Ejemplo n.º 14
0
 public MainWindowViewModel(IIssueService issueService, IProjectService projectService, IRepositoryService repositoryService,
     IScriptService scriptService, IMailService mailService, IDocumentBuilder documentBuilder, ICustomFieldsService customFieldsService)
 {
     _issueService = issueService;
     _projectService = projectService;
     _repositoryService = repositoryService;
     _scriptService = scriptService;
     _mailService = mailService;
     _documentBuilder = documentBuilder;
     _customFieldsService = customFieldsService;
 }
 public ScriptExecutionService(
     SqLiteDataContext Context,
     ILogger <ScriptExecutionService> Logger,
     IConfiguration Configuration,
     IScriptService ScriptService)
 {
     _context       = Context;
     _logger        = Logger;
     _configuration = Configuration;
     _scriptService = ScriptService;
 }
Ejemplo n.º 16
0
        public WebViewPageBase()
        {
            _widgetTemplateService    = HostContainer.GetInstance <IWidgetTemplateService>();
            _userService              = HostContainer.GetInstance <IUserService>();
            _localizedResourceService = HostContainer.GetInstance <IEzCMSLocalizedResourceService>();
            _siteSettingService       = HostContainer.GetInstance <ISiteSettingService>();
            _styleService             = HostContainer.GetInstance <IStyleService>();
            _scriptService            = HostContainer.GetInstance <IScriptService>();

            _currentController = (ControllerBase)HttpContext.Current.Items[FrameworkConstants.EzCurrentController];
        }
Ejemplo n.º 17
0
 public ScriptController(
     IScriptService ScriptService,
     ILogger <ScriptController> Logger,
     IMapper Mapper,
     IScriptExecutionService ScriptExecutionService
     )
 {
     _scriptService          = ScriptService;
     _scriptExecutionService = ScriptExecutionService;
     _logger = Logger;
     _mapper = Mapper;
 }
Ejemplo n.º 18
0
 public CardController(SynchronizationContext synchronizationContext, ICardDetector cardDetector, IVolumeWatcher volumeWatcher, IVolumeContainer volumeContainer, IPartitionService partitionService, IBootService bootService, IScriptService scriptService,
                       MainViewModel mainViewModel, IStepProvider stepProvider, string stepName, ILoggerFactory loggerFactory)
     : base(mainViewModel, stepProvider, stepName, loggerFactory)
 {
     SynchronizationContext = synchronizationContext;
     CardDetector           = cardDetector;
     VolumeWatcher          = volumeWatcher;
     VolumeContainer        = volumeContainer;
     PartitionService       = partitionService;
     BootService            = bootService;
     ScriptService          = scriptService;
 }
        public MainPageViewModel(
            IConnectionsService connservice,
            INavObjectService objservice,
            ICommandService commandservice,
            IScriptService Scriptservice)
        {
            _ObjectService     = objservice;
            _ConnectionService = connservice;
            _CommandService    = commandservice;
            _Scriptservice     = Scriptservice;

            Init();
        }
 public MakeActiveSelectedReleaseCommandHandler(
     IMediator mediator,
     Registry registry,
     IFileManagerService fileManagerService,
     ILocalReleaseService localReleaseService,
     IFileDownloader fileDownloader,
     IScriptService scriptService
     )
 {
     _mediator            = mediator;
     _registry            = registry;
     _fileManagerService  = fileManagerService;
     _localReleaseService = localReleaseService;
     _fileDownloader      = fileDownloader;
     _scriptService       = scriptService;
 }
Ejemplo n.º 21
0
        public ScriptEditorViewModel(IScriptService scriptManager,
                                     IEventAggregator eventAggregator)
        {
            _scriptManager   = scriptManager;
            _eventAggregator = eventAggregator;
            Constants        = new ObservableCollection <string>();
            ScriptText       = string.Empty;

            LoadHelperBox();

            CopyMethodTextCommand   = new DelegateCommand(CopyMethodText);
            CopyConstantTextCommand = new DelegateCommand(CopyConstantText);
            ValidateScriptCommand   = new DelegateCommand(ValidateScript);
            NewScriptCommand        = new DelegateCommand(NewScript);
            SaveScriptCommand       = new DelegateCommand(SaveScript);
            OpenScriptCommand       = new DelegateCommand(OpenScript);
        }
Ejemplo n.º 22
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DeploymentService"/> class.
        /// </summary>
        /// <param name="databaseService">
        /// The database service to use for database calls
        /// </param>
        /// <param name="configurationService">
        /// The configuration Service.
        /// </param>
        /// <param name="scriptService">
        /// The script Service.
        /// </param>
        /// <param name="fileService">
        /// The file Service.
        /// </param>
        /// <param name="scriptMessageFormatter">
        /// The script formatter for messages
        /// </param>
        public DeploymentService(IDatabaseService databaseService, IConfigurationService configurationService, IScriptService scriptService, IFileService fileService, IScriptMessageFormatter scriptMessageFormatter)
        {
            if (log.IsDebugEnabled)
            {
                log.Debug(LogUtility.GetContext(databaseService, configurationService, scriptService, fileService, scriptMessageFormatter));
            }

            this.databaseService        = databaseService;
            this.configurationService   = configurationService;
            this.scriptService          = scriptService;
            this.fileService            = fileService;
            this.scriptMessageFormatter = scriptMessageFormatter;

            if (log.IsDebugEnabled)
            {
                log.Debug(LogUtility.GetResult());
            }
        }
Ejemplo n.º 23
0
        /// <summary>
        /// creates a new <see cref="ScriptCompiler"/>
        /// </summary>
        /// <param name="logger">access to logging</param>
        /// <param name="parser">parser used to parse scripts</param>
        /// <param name="cache">access to object cache</param>
        /// <param name="methodprovider">provides managed method hosts to scripts</param>
        /// <param name="scriptservice">used to load scripts if not found in cache</param>
        /// <param name="archive">archive used to load revisions</param>
        /// <param name="importservice">access to javascript imports</param>
        /// <param name="pythonservice">access to python script logic</param>
        /// <param name="luaservice">used to execute lua code</param>
        public ScriptCompiler(ILogger <ScriptCompiler> logger, IScriptParser parser, ICacheService cache, IMethodProviderService methodprovider, IScriptService scriptservice, IArchiveService archive, IScriptImportService importservice, IPythonService pythonservice, ILuaService luaservice)
        {
            this.parser        = parser;
            this.cache         = cache;
            this.scriptservice = scriptservice;
            this.archive       = archive;
            this.importservice = importservice;
            this.pythonservice = pythonservice;
            this.luaservice    = luaservice;
            this.logger        = logger;

            if (parser != null)
            {
                parser.Extensions.AddExtensions(typeof(Math));
                parser.Extensions.AddExtensions <ScriptEnumerations>();
                parser.ImportProvider = methodprovider;
            }

            ReactInitializer.Initialize();
        }
Ejemplo n.º 24
0
 public ServerGameService(
     EntityWorld world,
     IServerSettingsService settingsService,
     IScriptService scriptService,
     IDataService dataService,
     IAppService appService,
     IServerNetworkService networkService,
     IScreenService screenService,
     IObjectMapper objectMapper,
     ISystemLoader systemLoader)
 {
     _world = world;
     _settingsService = settingsService;
     _scriptService = scriptService;
     _dataService = dataService;
     _appService = appService;
     _networkService = networkService;
     _screenService = screenService;
     _objectMapper = objectMapper;
     _systemLoader = systemLoader;
 }
Ejemplo n.º 25
0
 public ServerScreen(EntityWorld world,
                     IEntityFactory entityFactory,
                     IServerNetworkService networkService,
                     IModuleService moduleService,
                     IModuleDataService moduleDataService,
                     IScriptService scriptService,
                     IDataService dataService,
                     IPathService pathService,
                     ILogger logger,
                     IServerSettingsService settingsService)
 {
     _world             = world;
     _entityFactory     = entityFactory;
     _networkService    = networkService;
     _moduleService     = moduleService;
     _moduleDataService = moduleDataService;
     _scriptService     = scriptService;
     _dataService       = dataService;
     _pathService       = pathService;
     _logger            = logger;
     _settingsService   = settingsService;
 }
Ejemplo n.º 26
0
 protected ScriptableAction(MainViewModel mainViewModel, IScriptService scriptService, bool value)
     : base(mainViewModel)
 {
     ScriptService = scriptService;
     Value         = value;
 }
Ejemplo n.º 27
0
 public ScriptController()
 {
     scriptService = new ScriptService();
 }
Ejemplo n.º 28
0
 public PageScriptService(IScriptService scriptService)
 {
     _scriptService = scriptService;
 }
Ejemplo n.º 29
0
 public ScriptsController(IUnitOfWork work, IMapper mapper, IScriptService scriptService)
 {
     _work          = work;
     _mapper        = mapper;
     _scriptService = scriptService;
 }
 public MediaQueryMatcher(IScriptService scriptService)
 {
     ScriptService = scriptService;
 }
        public DeploymentJobExecutionService(
            IDeploymentJobService deploymentJobService,
            IDeploymentJobStepService deploymentJobStepService,
            IDeploymentJobStepTargetService deploymentJobStepTargetService,
            IDeploymentPlanStepService deploymentPlanStepService,
            ITargetGroupService targetGroupService,
            ITargetGroupEnvironmentService targetGroupEnvironmentService,
            IProjectTargetService projectTargetService,
            ITargetService targetService,
            ICredentialService credentialService,
            IScriptService scriptService,
            IScriptExecutionService scriptExecutionService,
            IProjectEnvironmentService projectEnvironmentService,
            IVariableService variableService)
        {
            if (deploymentJobService == null)
                throw new ArgumentNullException("deploymentJobService");
            _deploymentJobService = deploymentJobService;

            if (deploymentJobStepService == null)
                throw new ArgumentNullException("deploymentJobStepService");
            _deploymentJobStepService = deploymentJobStepService;

            if (deploymentJobStepTargetService == null)
                throw new ArgumentNullException("deploymentJobStepTargetService");
            _deploymentJobStepTargetService = deploymentJobStepTargetService;

            if (deploymentPlanStepService == null)
                throw new ArgumentNullException("deploymentPlanStepService");
            _deploymentPlanStepService = deploymentPlanStepService;

            if (targetGroupService == null)
                throw new ArgumentNullException("targetGroupService");
            _targetGroupService = targetGroupService;

            if (targetGroupEnvironmentService == null)
                throw new ArgumentNullException("targetGroupEnvironmentService");
            _targetGroupEnvironmentService = targetGroupEnvironmentService;

            if (projectTargetService == null)
                throw new ArgumentNullException("projectTargetService");
            _projectTargetService = projectTargetService;

            if (targetService == null)
                throw new ArgumentNullException("targetService");
            _targetService = targetService;

            if (credentialService == null)
                throw new ArgumentNullException("credentialService");
            _credentialService = credentialService;

            if (scriptService == null)
                throw new ArgumentNullException("scriptService");
            _scriptService = scriptService;

            if (scriptExecutionService == null)
                throw new ArgumentNullException("scriptExecutionService");
            _scriptExecutionService = scriptExecutionService;

            if (projectEnvironmentService == null)
                throw new ArgumentNullException("projectEnvironmentService");
            _projectEnvironmentService = projectEnvironmentService;

            if (variableService == null)
                throw new ArgumentNullException("variableService");
            _variableService = variableService;
        }
Ejemplo n.º 32
0
 public SetScriptableAction(MainViewModel mainViewModel, IScriptService scriptService)
     : base(mainViewModel, scriptService, true)
 {
 }
Ejemplo n.º 33
0
        public PopoverHelper(IScriptService scriptService, DomHelpers domHelpers)
        {
            ScriptService = scriptService;

            DomHelpers = domHelpers;
        }
Ejemplo n.º 34
0
 public ClearScriptableAction(MainViewModel mainViewModel, IScriptService scriptService)
     : base(mainViewModel, scriptService, false)
 {
 }
Ejemplo n.º 35
0
 /// <summary>
 /// creates a new <see cref="ScriptController"/>
 /// </summary>
 /// <param name="logger">access to logging</param>
 /// <param name="scriptservice">access to script service</param>
 /// <param name="archiveservice">archived object data</param>
 public ScriptController(ILogger <ScriptController> logger, IScriptService scriptservice, IArchiveService archiveservice)
 {
     this.logger         = logger;
     this.scriptservice  = scriptservice;
     this.archiveservice = archiveservice;
 }