Пример #1
0
 public DocumentationGenerator(IAssemblyLoader assemblyLoader, IXmlLoader xmlLoader, IAssemblyXmlParser parser,
                               IBulkPageWriter writer, IUntransformableResourceManager resourceManager)
 {
     this.assemblyLoader = assemblyLoader;
     this.xmlLoader = xmlLoader;
     this.parser = parser;
     this.writer = writer;
     this.resourceManager = resourceManager;
 }
Пример #2
0
    void LoadVars()
    {
        IXmlLoader XmlLoader = GameObject.FindGameObjectWithTag("XmlLoader").GetComponent <IXmlLoader>();

        if (!XmlLoader.FloatVars.TryGetValue("Chassis.MaxHealth", out _maxHealth))
        {
            Debug.LogError("Could not find Chassis.MaxHealth from XmlLoader");
        }
    }
Пример #3
0
    void LoadVars()
    {
        IXmlLoader XmlLoader = GameObject.FindGameObjectWithTag("XmlLoader").GetComponent <IXmlLoader>();

        if (!XmlLoader.FloatVars.TryGetValue("SteeringMover.ThrustStages", out thrustStages))
        {
            Debug.LogError("Could not find SteeringMover.ThrustStages from XmlLoader");
        }
    }
Пример #4
0
 public DocumentationGenerator(IAssemblyLoader assemblyLoader, IXmlLoader xmlLoader, IAssemblyXmlParser parser, IBulkPageWriter writer, IUntransformableResourceManager resourceManager, IEventAggregator eventAggregator)
 {
     this.assemblyLoader  = assemblyLoader;
     this.xmlLoader       = xmlLoader;
     this.parser          = parser;
     this.writer          = writer;
     this.resourceManager = resourceManager;
     this.eventAggregator = eventAggregator;
 }
        public void CreateStubs()
        {
            StubWriter = MockRepository.GenerateStub<IBulkPageWriter>();
            StubParser = MockRepository.GenerateStub<IAssemblyXmlParser>();
            StubResourceManager = MockRepository.GenerateStub<IUntransformableResourceManager>();
            StubAssemblyLoader = MockRepository.GenerateStub<IAssemblyLoader>();
            StubXmlLoader = MockRepository.GenerateStub<IXmlLoader>();

            StubAssemblyLoader.Stub(x => x.LoadFrom(null))
                .IgnoreArguments()
                .Return(typeof(DocumentationGenerator).Assembly);
        }
Пример #6
0
        public void CreateStubs()
        {
            StubWriter          = MockRepository.GenerateStub <IBulkPageWriter>();
            StubParser          = MockRepository.GenerateStub <IAssemblyXmlParser>();
            StubResourceManager = MockRepository.GenerateStub <IUntransformableResourceManager>();
            StubAssemblyLoader  = MockRepository.GenerateStub <IAssemblyLoader>();
            StubXmlLoader       = MockRepository.GenerateStub <IXmlLoader>();
            StubEventAggregator = MockRepository.GenerateStub <IEventAggregator>();

            StubAssemblyLoader.Stub(x => x.LoadFrom(null))
            .IgnoreArguments()
            .Return(typeof(DocumentationGenerator).Assembly);
        }
Пример #7
0
    void LoadVars()
    {
        IXmlLoader XmlLoader = GameObject.FindGameObjectWithTag("XmlLoader").GetComponent <IXmlLoader>();

        if (!XmlLoader.FloatVars.TryGetValue("LaserWeapon.MaxDistance", out maxDistance))
        {
            Debug.LogError("Could not find LaserWeapon.MaxDistance from XmlLoader");
        }
        if (!XmlLoader.FloatVars.TryGetValue("LaserWeapon.MaxCharge", out maxCharge))
        {
            Debug.LogError("Could not find LaserWeapon.MaxCharge from XmlLoader");
        }
        if (!XmlLoader.FloatVars.TryGetValue("LaserWeapon.DamagePerSecond", out damagePerSecond))
        {
            Debug.LogError("Could not find LaserWeapon.DamagePerSecond from XmlLoader");
        }
    }
Пример #8
0
    void LoadVars()
    {
        IXmlLoader XmlLoader = GameObject.FindGameObjectWithTag("XmlLoader").GetComponent <IXmlLoader>();

        if (!XmlLoader.FloatVars.TryGetValue("CameraController.Padding", out padding))
        {
            Debug.LogError("Could not find CameraController.Padding from XmlLoader");
        }
        if (!XmlLoader.FloatVars.TryGetValue("CameraController.MinZoom", out minZoom))
        {
            Debug.LogError("Could not find CameraController.MinZoom from XmlLoader");
        }
        if (!XmlLoader.FloatVars.TryGetValue("CameraController.MaxZoom", out maxZoom))
        {
            Debug.LogError("Could not find CameraController.MaxZoom from XmlLoader");
        }
    }
Пример #9
0
        public async Task Load(IXmlLoader xmlLoader)
        {
            var listFontIcon = await xmlLoader.GetAsync("Files", _iconFile, "icon");

            var listColor = await xmlLoader.GetAsync("Files", _colorFile, "color");

            try
            {
                // insert font icon style
                listFontIcon.ForEach(f => ListFontIcons.Add(new FontIconModel(f.Key).WithFont(f.Value)));
                ListFontIcons.ForEach(c => Application.Current.Resources[$"{c.Name}"] = c.Style);

                //insert list color
                listColor.ForEach(c => Application.Current.Resources[$"{c.Key}"] = Color.FromHex(c.Value));
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Theme Load: Error occured during loading theme=>{ex.Message}");
            }
        }
Пример #10
0
    void LoadVars()
    {
        IXmlLoader XmlLoader = GameObject.FindGameObjectWithTag("XmlLoader").GetComponent <IXmlLoader>();

        if (!XmlLoader.FloatVars.TryGetValue("MapCameraController.Padding", out padding))
        {
            Debug.LogError("Could not find MapCameraController.Padding from XmlLoader");
        }
        if (!XmlLoader.FloatVars.TryGetValue("MapCameraController.MaxSize", out maxSize))
        {
            Debug.LogError("Could not find MapCameraController.MaxSize from XmlLoader");
        }
        if (!XmlLoader.FloatVars.TryGetValue("MapCameraController.MinSize", out minSize))
        {
            Debug.LogError("Could not find MapCameraController.MinSize from XmlLoader");
        }
        if (!XmlLoader.FloatVars.TryGetValue("MapCameraController.ZoomSpeed", out zoomSpeed))
        {
            Debug.LogError("Could not find MapCameraController.ZoomSpeed from XmlLoader");
        }
    }
Пример #11
0
    void LoadVars()
    {
        IXmlLoader XmlLoader = GameObject.FindGameObjectWithTag("XmlLoader").GetComponent <IXmlLoader>();

        if (!XmlLoader.FloatVars.TryGetValue("StandardEngine.MaxSpeed", out _maxSpeed))
        {
            Debug.LogError("Could not find StandardEngine.MaxSpeed from XmlLoader");
        }
        if (!XmlLoader.FloatVars.TryGetValue("StandardEngine.RotationSpeed", out _rotationSpeed))
        {
            Debug.LogError("Could not find StandardEngine.RotationSpeed from XmlLoader");
        }
        if (!XmlLoader.FloatVars.TryGetValue("StandardEngine.ReversePenalty", out _reversePenalty))
        {
            Debug.LogError("Could not find StandardEngine.ReversePenalty from XmlLoader");
        }
        if (!XmlLoader.FloatVars.TryGetValue("StandardEngine.Acceleration", out _acceleration))
        {
            Debug.LogError("Could not find StandardEngine.Acceleration from XmlLoader");
        }
    }
Пример #12
0
 public ConfigProject(IXmlLoader xmlLoader)
 {
     m_xmlLoader = xmlLoader;
 }
Пример #13
0
 private static void ResolveDependencies()
 {
     _converter = _container.Resolve <IXmlConverter>();
     _writer    = _container.Resolve <ICsvWriter>();
     _loader    = _container.Resolve <IXmlLoader>();
 }
 public BuildProject(String name, IXmlLoader xmlLoader)
 {
     m_title     = new ProjectTitle(name);
     m_xmlLoader = xmlLoader;
 }
Пример #15
0
 public XmlProgrammersStore(IXmlLoader xmlLoader, IProgrammersFactory programmersFactory)
 {
     _xmlLoader          = xmlLoader;
     _programmersFactory = programmersFactory;
 }
Пример #16
0
 public ConfigFile(IXmlLoader xmlLoader)
 {
     m_xmlLoader    = xmlLoader;
     Includes       = new List <String>();
     ConfigProjects = new List <ConfigProject>();
 }
 public XmlNetworkStore(IXmlLoader xmlLoader, INetworkFactory networkFactory)
 {
     _xmlLoader      = xmlLoader;
     _networkFactory = networkFactory;
 }