Exemplo n.º 1
0
 public override async Task Generate(ServiceClient serviceClient)
 {
     var viewModel = new SampleViewModel();
     var model = new SampleModel();
     model.Model = viewModel;
     await Write(model, Path.Combine(Settings.ModelsName, "Pet.cs"));
 }
Exemplo n.º 2
0
 public override async Task Generate(CodeModel codeModel)
 {
     var viewModel = new SampleViewModel();
     var model = new SampleModel();
     model.Model = viewModel;
     await Write(model, Path.Combine(Settings.Instance.ModelsName, "Pet.cs"));
 }
Exemplo n.º 3
0
        public override async Task Generate(ServiceClient serviceClient)
        {
            var viewModel = new SampleViewModel();
            var model     = new SampleModel();

            model.Model = viewModel;
            await Write(model, Path.Combine(Settings.ModelsName, "Pet.cs"));
        }
Exemplo n.º 4
0
        public override async Task Generate(CodeModel codeModel)
        {
            var viewModel = new SampleViewModel();
            var model     = new SampleModel();

            model.Model = viewModel;
            await Write(model, Path.Combine(Settings.Instance.ModelsName, "Pet.cs"));
        }
        public void CodeWriterWritesCRefAttribute()
        {
            var sampleModelTemplate = new SampleModel();
            var sampleViewModel = new SampleViewModel();

            sampleModelTemplate.Model = sampleViewModel;
            var output = sampleModelTemplate.ToString();
            Assert.True(output.Contains("/// <exception cref=\"CloudException\">"));
            Assert.True(output.Contains("/// <exception cref=\"ArgumentNullException\">"));
        }
        public void CodeWriterWrapsComments()
        {
            var sampleModelTemplate = new SampleModel();
            var sampleViewModel = new SampleViewModel();

            sampleModelTemplate.Model = sampleViewModel;
            var output = sampleModelTemplate.ToString();
            Assert.True(output.ContainsMultiline(@"/// Deserialize current type to Json object because today is Friday
        /// and there is a sun outside the window."));
        }