public void CanCreateStructWithAdditionalProperties()
        {
            var s = new InputAdditionalPropertiesModelStruct(123, new Dictionary <string, object>()
            {
                { "a", "b" },
                { "c", 2 }
            });

            Assert.AreEqual(123, s.Id);
            Assert.AreEqual("b", s["a"]);
            Assert.AreEqual(2, s["c"]);
        }
Esempio n. 2
0
 public virtual Response WriteOnlyStruct(InputAdditionalPropertiesModelStruct createParameters, CancellationToken cancellationToken = default)
 {
     using var scope = _clientDiagnostics.CreateScope("APClient.WriteOnlyStruct");
     scope.Start();
     try
     {
         return(RestClient.WriteOnlyStruct(createParameters, cancellationToken));
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }
Esempio n. 3
0
 public virtual async Task <Response> WriteOnlyStructAsync(InputAdditionalPropertiesModelStruct createParameters, CancellationToken cancellationToken = default)
 {
     using var scope = _clientDiagnostics.CreateScope("APClient.WriteOnlyStruct");
     scope.Start();
     try
     {
         return(await RestClient.WriteOnlyStructAsync(createParameters, cancellationToken).ConfigureAwait(false));
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }