Skip to content

Commit 251f0af

Browse files
author
Konstantina Chremmou
committed
Action from CA-408836: Deprecate the method SaveChanges. It is a XenCenterism and not always correct.
Signed-off-by: Konstantina Chremmou <[email protected]>
1 parent 04f8b87 commit 251f0af

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

ocaml/sdk-gen/csharp/autogen/src/Event.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public override void UpdateFrom(Event update)
4545
id = update.id;
4646
}
4747

48+
[Obsolete("Use the calls setting individual fields of the API object instead.")]
4849
public override string SaveChanges(Session session, string opaqueRef, Event serverObject)
4950
{
5051
if (opaqueRef == null)

ocaml/sdk-gen/csharp/autogen/src/Session.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ public override void UpdateFrom(Session update)
222222
throw new Exception("The method or operation is not implemented.");
223223
}
224224

225+
[Obsolete("Use the calls setting individual fields of the API object instead.")]
225226
public override string SaveChanges(Session session, string serverOpaqueRef, Session serverObject)
226227
{
227228
throw new Exception("The method or operation is not implemented.");

ocaml/sdk-gen/csharp/autogen/src/XenObject.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,7 @@ public abstract partial class XenObject<S> : IXenObject where S : XenObject<S>
4242
/// </summary>
4343
public abstract void UpdateFrom(S record);
4444

45-
/// <summary>
46-
/// Save any changed fields to the server.
47-
/// This method is usually invoked on a thread pool thread.
48-
/// </summary>
49-
/// <param name="session"></param>
50-
/// <param name="serverOpaqueRef"/>
51-
/// <param name="serverObject">Changes are sent to the server if the field in "this"
52-
/// is different from serverObject. Can be the object in the cache, or another reference
53-
/// object that we want to save changes to.</param>
45+
[Obsolete("Use the calls setting individual fields of the API object instead.")]
5446
public abstract string SaveChanges(Session session, string serverOpaqueRef, S serverObject);
5547

5648
public string opaque_ref { get; set; }

ocaml/sdk-gen/csharp/gen_csharp_binding.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,8 @@ and gen_class out_chan cls =
353353
print
354354
";\n\
355355
\ }\n\n\
356+
\ [Obsolete(\"Use the calls setting individual fields of the API \
357+
object instead.\")]
356358
\ public override string SaveChanges(Session session, string \
357359
opaqueRef, %s server)\n\
358360
\ {\n\

0 commit comments

Comments
 (0)