// // Copyright (c) ZeroC, Inc. All rights reserved. // // // Ice version 3.7.2 // // // // Generated from file `Progress.ice' // // Warning: do not edit this file. // // // using _System = global::System; #pragma warning disable 1591 namespace Smartswitch { [global::System.Runtime.InteropServices.ComVisible(false)] [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704")] [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707")] [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709")] [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710")] [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1711")] [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1715")] [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")] [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720")] [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1722")] [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1724")] public partial interface Progress : global::Ice.Object, ProgressOperations_ { } } namespace Smartswitch { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("slice2cs", "3.7.2")] public delegate void Callback_Progress_inc(); } namespace Smartswitch { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("slice2cs", "3.7.2")] public interface ProgressPrx : global::Ice.ObjectPrx { void inc(global::Ice.OptionalContext context = new global::Ice.OptionalContext()); global::System.Threading.Tasks.Task incAsync(global::Ice.OptionalContext context = new global::Ice.OptionalContext(), global::System.IProgress progress = null, global::System.Threading.CancellationToken cancel = new global::System.Threading.CancellationToken()); global::Ice.AsyncResult begin_inc(global::Ice.OptionalContext context = new global::Ice.OptionalContext()); global::Ice.AsyncResult begin_inc(global::Ice.AsyncCallback callback, object cookie); global::Ice.AsyncResult begin_inc(global::Ice.OptionalContext context, global::Ice.AsyncCallback callback, object cookie); void end_inc(global::Ice.AsyncResult asyncResult); } } namespace Smartswitch { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("slice2cs", "3.7.2")] public interface ProgressOperations_ { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("slice2cs", "3.7.2")] void inc(global::Ice.Current current = null); } } namespace Smartswitch { [global::System.Runtime.InteropServices.ComVisible(false)] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("slice2cs", "3.7.2")] [global::System.Serializable] public sealed class ProgressPrxHelper : global::Ice.ObjectPrxHelperBase, ProgressPrx { public ProgressPrxHelper() { } public ProgressPrxHelper(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { } #region Synchronous operations public void inc(global::Ice.OptionalContext context = new global::Ice.OptionalContext()) { try { _iceI_incAsync(context, null, global::System.Threading.CancellationToken.None, true).Wait(); } catch(global::System.AggregateException ex_) { throw ex_.InnerException; } } #endregion #region Async Task operations public global::System.Threading.Tasks.Task incAsync(global::Ice.OptionalContext context = new global::Ice.OptionalContext(), global::System.IProgress progress = null, global::System.Threading.CancellationToken cancel = new global::System.Threading.CancellationToken()) { return _iceI_incAsync(context, progress, cancel, false); } private global::System.Threading.Tasks.Task _iceI_incAsync(global::Ice.OptionalContext context, global::System.IProgress progress, global::System.Threading.CancellationToken cancel, bool synchronous) { var completed = new global::IceInternal.OperationTaskCompletionCallback(progress, cancel); _iceI_inc(context, synchronous, completed); return completed.Task; } private const string _inc_name = "inc"; private void _iceI_inc(global::System.Collections.Generic.Dictionary context, bool synchronous, global::IceInternal.OutgoingAsyncCompletionCallback completed) { var outAsync = getOutgoingAsync(completed); outAsync.invoke( _inc_name, global::Ice.OperationMode.Normal, global::Ice.FormatType.DefaultFormat, context, synchronous); } #endregion #region Asynchronous operations public global::Ice.AsyncResult begin_inc(global::Ice.OptionalContext context = new global::Ice.OptionalContext()) { return begin_inc(context, null, null, false); } public global::Ice.AsyncResult begin_inc(global::Ice.AsyncCallback callback, object cookie) { return begin_inc(new global::Ice.OptionalContext(), callback, cookie, false); } public global::Ice.AsyncResult begin_inc(global::Ice.OptionalContext context, global::Ice.AsyncCallback callback, object cookie) { return begin_inc(context, callback, cookie, false); } public void end_inc(global::Ice.AsyncResult asyncResult) { var resultI_ = global::IceInternal.AsyncResultI.check(asyncResult, this, _inc_name); ((global::IceInternal.OutgoingAsyncT)resultI_.OutgoingAsync).getResult(resultI_.wait()); } private global::Ice.AsyncResult begin_inc(global::System.Collections.Generic.Dictionary context, global::Ice.AsyncCallback completedCallback, object cookie, bool synchronous) { var completed = new global::IceInternal.OperationAsyncResultCompletionCallback( (Callback_Progress_inc cb, object ret) => { if(cb != null) { cb.Invoke(); } }, this, _inc_name, cookie, completedCallback); _iceI_inc(context, synchronous, completed); return completed; } #endregion #region Checked and unchecked cast operations public static ProgressPrx checkedCast(global::Ice.ObjectPrx b) { if(b == null) { return null; } ProgressPrx r = b as ProgressPrx; if((r == null) && b.ice_isA(ice_staticId())) { ProgressPrxHelper h = new ProgressPrxHelper(); h.iceCopyFrom(b); r = h; } return r; } public static ProgressPrx checkedCast(global::Ice.ObjectPrx b, global::System.Collections.Generic.Dictionary ctx) { if(b == null) { return null; } ProgressPrx r = b as ProgressPrx; if((r == null) && b.ice_isA(ice_staticId(), ctx)) { ProgressPrxHelper h = new ProgressPrxHelper(); h.iceCopyFrom(b); r = h; } return r; } public static ProgressPrx checkedCast(global::Ice.ObjectPrx b, string f) { if(b == null) { return null; } global::Ice.ObjectPrx bb = b.ice_facet(f); try { if(bb.ice_isA(ice_staticId())) { ProgressPrxHelper h = new ProgressPrxHelper(); h.iceCopyFrom(bb); return h; } } catch(global::Ice.FacetNotExistException) { } return null; } public static ProgressPrx checkedCast(global::Ice.ObjectPrx b, string f, global::System.Collections.Generic.Dictionary ctx) { if(b == null) { return null; } global::Ice.ObjectPrx bb = b.ice_facet(f); try { if(bb.ice_isA(ice_staticId(), ctx)) { ProgressPrxHelper h = new ProgressPrxHelper(); h.iceCopyFrom(bb); return h; } } catch(global::Ice.FacetNotExistException) { } return null; } public static ProgressPrx uncheckedCast(global::Ice.ObjectPrx b) { if(b == null) { return null; } ProgressPrx r = b as ProgressPrx; if(r == null) { ProgressPrxHelper h = new ProgressPrxHelper(); h.iceCopyFrom(b); r = h; } return r; } public static ProgressPrx uncheckedCast(global::Ice.ObjectPrx b, string f) { if(b == null) { return null; } global::Ice.ObjectPrx bb = b.ice_facet(f); ProgressPrxHelper h = new ProgressPrxHelper(); h.iceCopyFrom(bb); return h; } private static readonly string[] _ids = { "::Ice::Object", "::Smartswitch::Progress" }; public static string ice_staticId() { return _ids[1]; } #endregion #region Marshaling support public static void write(global::Ice.OutputStream ostr, ProgressPrx v) { ostr.writeProxy(v); } public static ProgressPrx read(global::Ice.InputStream istr) { global::Ice.ObjectPrx proxy = istr.readProxy(); if(proxy != null) { ProgressPrxHelper result = new ProgressPrxHelper(); result.iceCopyFrom(proxy); return result; } return null; } #endregion } } namespace Smartswitch { [global::System.Runtime.InteropServices.ComVisible(false)] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("slice2cs", "3.7.2")] public abstract class ProgressDisp_ : global::Ice.ObjectImpl, Progress { #region Slice operations public abstract void inc(global::Ice.Current current = null); #endregion #region Slice type-related members private static readonly string[] _ids = { "::Ice::Object", "::Smartswitch::Progress" }; public override bool ice_isA(string s, global::Ice.Current current = null) { return global::System.Array.BinarySearch(_ids, s, IceUtilInternal.StringUtil.OrdinalStringComparer) >= 0; } public override string[] ice_ids(global::Ice.Current current = null) { return _ids; } public override string ice_id(global::Ice.Current current = null) { return _ids[1]; } public static new string ice_staticId() { return _ids[1]; } #endregion #region Operation dispatch [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")] public static global::System.Threading.Tasks.Task iceD_inc(Progress obj, global::IceInternal.Incoming inS, global::Ice.Current current) { global::Ice.ObjectImpl.iceCheckMode(global::Ice.OperationMode.Normal, current.mode); inS.readEmptyParams(); obj.inc(current); return inS.setResult(inS.writeEmptyParams()); } private static readonly string[] _all = { "ice_id", "ice_ids", "ice_isA", "ice_ping", "inc" }; public override global::System.Threading.Tasks.Task iceDispatch(global::IceInternal.Incoming inS, global::Ice.Current current) { int pos = global::System.Array.BinarySearch(_all, current.operation, global::IceUtilInternal.StringUtil.OrdinalStringComparer); if(pos < 0) { throw new global::Ice.OperationNotExistException(current.id, current.facet, current.operation); } switch(pos) { case 0: { return global::Ice.ObjectImpl.iceD_ice_id(this, inS, current); } case 1: { return global::Ice.ObjectImpl.iceD_ice_ids(this, inS, current); } case 2: { return global::Ice.ObjectImpl.iceD_ice_isA(this, inS, current); } case 3: { return global::Ice.ObjectImpl.iceD_ice_ping(this, inS, current); } case 4: { return iceD_inc(this, inS, current); } } global::System.Diagnostics.Debug.Assert(false); throw new global::Ice.OperationNotExistException(current.id, current.facet, current.operation); } #endregion } }