public static void Run() { // begin var d1 = new DateTime(1983, 03, 02); IDateWrapper w = new DateWrapper(d1); var d2 = w.Value; // end Logger.Log("Date: ", d2); }
/// <summary> /// Put complex types with date properties /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='complexBody'> /// Please put '0001-01-01' and '2016-02-29' /// </param> public static void PutDate(this IPrimitiveOperations operations, DateWrapper complexBody) { operations.PutDateAsync(complexBody).GetAwaiter().GetResult(); }
/// <summary> /// Put complex types with date properties /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='complexBody'> /// Please put '0001-01-01' and '2016-02-29' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PutDateAsync(this IPrimitiveOperations operations, DateWrapper complexBody, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.PutDateWithHttpMessagesAsync(complexBody, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
public static extern DateWrapper GetTomorrowWrapped(DateWrapper today);
/// <summary> /// Put complex types with date properties /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='complexBody'> /// Please put '0001-01-01' and '2016-02-29' /// </param> public static void PutDate(this IPrimitiveOperations operations, DateWrapper complexBody) { Task.Factory.StartNew(s => ((IPrimitiveOperations)s).PutDateAsync(complexBody), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Put complex types with date properties /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='complexBody'> /// Please put '0001-01-01' and '2016-02-29' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PutDateAsync(this IPrimitiveOperations operations, DateWrapper complexBody, CancellationToken cancellationToken = default(CancellationToken)) { await operations.PutDateWithHttpMessagesAsync(complexBody, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Put complex types with date properties /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='complexBody'> /// Please put '0001-01-01' and '2016-02-29' /// </param> public static void PutDate(this IPrimitiveOperations operations, DateWrapper complexBody) { Task.Factory.StartNew(s => ((IPrimitiveOperations)s).PutDateAsync(complexBody), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Put complex types with date properties /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='complexBody'> /// Please put '0001-01-01' and '2016-02-29' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task PutDateAsync(this IPrimitive operations, DateWrapper complexBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await operations.PutDateWithHttpMessagesAsync(complexBody, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Put complex types with date properties /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='complexBody'> /// Please put '0001-01-01' and '2016-02-29' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task PutDateAsync(this IPrimitive operations, DateWrapper complexBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await operations.PutDateWithHttpMessagesAsync(complexBody, null, cancellationToken).ConfigureAwait(false); }
public static void Save(IValueSink sink, DateWrapper value) { Value<Date>.Save(sink, value.Item); }