コード例 #1
0
 /// <summary>
 /// Adds or replaces a digital twin.
 /// Status codes:
 /// 200 (OK): Success.
 /// 400 (Bad Request): The request is invalid.
 /// 412 (Precondition Failed): The model is decommissioned or the digital twin
 /// already exists (when using If-None-Match: *).
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The id of the digital twin. The id is unique within the service and case
 /// sensitive.
 /// </param>
 /// <param name='twin'>
 /// The digital twin instance being added. If provided, the $dtId property is
 /// ignored.
 /// </param>
 /// <param name='ifNoneMatch'>
 /// Only perform the operation if the entity does not already exist. Possible
 /// values include: '*'
 /// </param>
 public static object Add(this IDigitalTwinsOperations operations, string id, object twin, string ifNoneMatch = default(string))
 {
     return(operations.AddAsync(id, twin, ifNoneMatch).GetAwaiter().GetResult());
 }