aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Views/DirectSynchronizationView.xaml.cs
blob: 5a7c12646c57d0fe6f517a2e2553b795d260d1be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Tango.MachineStudio.Synchronization.Views
{
    /// <summary>
    /// Interaction logic for DirectSynchronizationView.xaml
    /// </summary>
    public partial class DirectSynchronizationView : UserControl
    {
        public DirectSynchronizationView()
        {
            InitializeComponent();
        }
    }
}
dio.Common.Web.LoginRequest, MachineStudio.Common.Web.LoginResponse, MachineService.Controllers.MachineStudioController>("Tango.MachineStudio.Common.Web", "MachineStudioWebClientBase", PathHelper.GetSolutionFolder() + @"\MachineStudio\Tango.MachineStudio.Common\Web"); } private static void GenerateWebClient<TLoginRequest, TLoginResponse, TController>(String nameSpace, String name, String path) where TLoginRequest : WebRequestMessage where TLoginResponse : WebTokenResponse where TController : TangoController { TangoWebClientCodeFile model = new TangoWebClientCodeFile(); model.Namespace = nameSpace; model.ControllerName = typeof(TController).Name.Replace("Controller", ""); model.Name = name; model.LoginRequest = typeof(TLoginRequest).FullName; model.LoginResponse = typeof(TLoginResponse).FullName; foreach (var action in typeof(TController).GetMethods().Where(x => typeof(WebResponseMessage).IsAssignableFrom(x.ReturnType) && x.Name != "Login")) { model.Actions.Add(new TangoWebClientCodeFile.ControllerAction() { Name = action.Name, Request = action.GetParameters()[0].ParameterType.FullName, Response = action.ReturnType.FullName, }); } String code = model.GenerateCode(); File.WriteAllText(Path.Combine(path, name + ".cs"), code); } } }