private static int DoGetUpdateFeedParams(IntPtr aPtr, IntPtr aInvocation) { GCHandle gch = GCHandle.FromIntPtr(aPtr); DvProviderLinnCoUkUpdate1 self = (DvProviderLinnCoUkUpdate1)gch.Target; DvInvocation invocation = new DvInvocation(aInvocation); string topic; string channel; try { invocation.ReadStart(); invocation.ReadEnd(); self.GetUpdateFeedParams(invocation, out topic, out channel); } catch (ActionError e) { invocation.ReportActionError(e, "GetUpdateFeedParams"); return(-1); } catch (PropertyUpdateError) { invocation.ReportError(501, String.Format("Invalid value for property {0}", new object[] { "GetUpdateFeedParams" })); return(-1); } catch (Exception e) { System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "GetUpdateFeedParams" }); System.Diagnostics.Debug.WriteLine(" Only ActionError or PropertyUpdateError should be thrown by actions"); return(-1); } try { invocation.WriteStart(); invocation.WriteString("Topic", topic); invocation.WriteString("Channel", channel); invocation.WriteEnd(); } catch (ActionError) { return(-1); } catch (System.Exception e) { System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "GetUpdateFeedParams" }); System.Diagnostics.Debug.WriteLine(" Only ActionError can be thrown by action response writer"); } return(0); }
private static int DoPushManifest(IntPtr aPtr, IntPtr aInvocation) { GCHandle gch = GCHandle.FromIntPtr(aPtr); DvProviderLinnCoUkUpdate1 self = (DvProviderLinnCoUkUpdate1)gch.Target; DvInvocation invocation = new DvInvocation(aInvocation); string uri; try { invocation.ReadStart(); uri = invocation.ReadString("Uri"); invocation.ReadEnd(); self.PushManifest(invocation, uri); } catch (ActionError e) { invocation.ReportActionError(e, "PushManifest"); return(-1); } catch (PropertyUpdateError) { invocation.ReportError(501, String.Format("Invalid value for property {0}", new object[] { "PushManifest" })); return(-1); } catch (Exception e) { System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "PushManifest" }); System.Diagnostics.Debug.WriteLine(" Only ActionError or PropertyUpdateError should be thrown by actions"); return(-1); } try { invocation.WriteStart(); invocation.WriteEnd(); } catch (ActionError) { return(-1); } catch (System.Exception e) { System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "PushManifest" }); System.Diagnostics.Debug.WriteLine(" Only ActionError can be thrown by action response writer"); } return(0); }