当前位置: 首页>>代码示例>>C#>>正文


C# DvInvocation.WriteUint方法代码示例

本文整理汇总了C#中DvInvocation.WriteUint方法的典型用法代码示例。如果您正苦于以下问题:C# DvInvocation.WriteUint方法的具体用法?C# DvInvocation.WriteUint怎么用?C# DvInvocation.WriteUint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DvInvocation的用法示例。


在下文中一共展示了DvInvocation.WriteUint方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DoGetSortCapabilities

 private static int DoGetSortCapabilities(IntPtr aPtr, IntPtr aInvocation, uint aVersion)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderUpnpOrgScheduledRecording2 self = (DvProviderUpnpOrgScheduledRecording2)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     string sortCaps;
     uint sortLevelCap;
     try
     {
         invocation.ReadStart();
         invocation.ReadEnd();
         self.GetSortCapabilities(aVersion, out sortCaps, out sortLevelCap);
     }
     catch (ActionError)
     {
         invocation.ReportError(501, "Invalid XML");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, "Invalid XML");
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2}", e.GetType(), e.Message, e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError can be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteString("SortCaps", sortCaps);
         invocation.WriteUint("SortLevelCap", sortLevelCap);
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2}", e.GetType(), e.Message, e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
         System.Diagnostics.Process.GetCurrentProcess().Kill();
     }
     return 0;
 }
开发者ID:wifigeek,项目名称:ohNet,代码行数:48,代码来源:DvUpnpOrgScheduledRecording2.cs

示例2: DoTracksMax

 private static int DoTracksMax(IntPtr aPtr, IntPtr aInvocation)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderAvOpenhomeOrgPlaylistManager1 self = (DvProviderAvOpenhomeOrgPlaylistManager1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     uint value;
     try
     {
         invocation.ReadStart();
         invocation.ReadEnd();
         self.TracksMax(invocation, out value);
     }
     catch (ActionError e)
     {
         invocation.ReportActionError(e, "TracksMax");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, String.Format("Invalid value for property {0}", "TracksMax"));
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "TracksMax", e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteUint("Value", value);
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "TracksMax", e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
     }
     return 0;
 }
开发者ID:nterry,项目名称:ohNet,代码行数:45,代码来源:DvAvOpenhomeOrgPlaylistManager1.cs

示例3: DoGetPositionInfo

 private static int DoGetPositionInfo(IntPtr aPtr, IntPtr aInvocation)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderUpnpOrgAVTransport1 self = (DvProviderUpnpOrgAVTransport1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     uint instanceID;
     uint track;
     string trackDuration;
     string trackMetaData;
     string trackURI;
     string relTime;
     string absTime;
     int relCount;
     int absCount;
     try
     {
         invocation.ReadStart();
         instanceID = invocation.ReadUint("InstanceID");
         invocation.ReadEnd();
         self.GetPositionInfo(invocation, instanceID, out track, out trackDuration, out trackMetaData, out trackURI, out relTime, out absTime, out relCount, out absCount);
     }
     catch (ActionError e)
     {
         invocation.ReportActionError(e, "GetPositionInfo");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, String.Format("Invalid value for property {0}", "GetPositionInfo"));
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "GetPositionInfo", e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteUint("Track", track);
         invocation.WriteString("TrackDuration", trackDuration);
         invocation.WriteString("TrackMetaData", trackMetaData);
         invocation.WriteString("TrackURI", trackURI);
         invocation.WriteString("RelTime", relTime);
         invocation.WriteString("AbsTime", absTime);
         invocation.WriteInt("RelCount", relCount);
         invocation.WriteInt("AbsCount", absCount);
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "GetPositionInfo", e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
     }
     return 0;
 }
开发者ID:broonie,项目名称:ohNet,代码行数:61,代码来源:DvUpnpOrgAVTransport1.cs

示例4: DoImportResource

 private static int DoImportResource(IntPtr aPtr, IntPtr aInvocation)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderUpnpOrgContentDirectory2 self = (DvProviderUpnpOrgContentDirectory2)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     string sourceURI;
     string destinationURI;
     uint transferID;
     try
     {
         invocation.ReadStart();
         sourceURI = invocation.ReadString("SourceURI");
         destinationURI = invocation.ReadString("DestinationURI");
         invocation.ReadEnd();
         self.ImportResource(invocation, sourceURI, destinationURI, out transferID);
     }
     catch (ActionError e)
     {
         invocation.ReportActionError(e, "ImportResource");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, String.Format("Invalid value for property {0}", "ImportResource"));
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "ImportResource", e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteUint("TransferID", transferID);
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "ImportResource", e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
     }
     return 0;
 }
开发者ID:Wodath,项目名称:ohNet,代码行数:49,代码来源:DvUpnpOrgContentDirectory2.cs

示例5: DoGetSharpness

 private static int DoGetSharpness(IntPtr aPtr, IntPtr aInvocation, uint aVersion)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderUpnpOrgRenderingControl1 self = (DvProviderUpnpOrgRenderingControl1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     uint instanceID;
     uint currentSharpness;
     try
     {
         invocation.ReadStart();
         instanceID = invocation.ReadUint("InstanceID");
         invocation.ReadEnd();
         self.GetSharpness(aVersion, instanceID, out currentSharpness);
     }
     catch (ActionError)
     {
         invocation.ReportError(501, "Invalid XML");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, "Invalid XML");
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2}", e.GetType(), e.Message, e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError can be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteUint("CurrentSharpness", currentSharpness);
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2}", e.GetType(), e.Message, e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
         System.Diagnostics.Process.GetCurrentProcess().Kill();
     }
     return 0;
 }
开发者ID:wifigeek,项目名称:ohNet,代码行数:48,代码来源:DvUpnpOrgRenderingControl1.cs

示例6: DoInsert

 private static int DoInsert(IntPtr aPtr, IntPtr aInvocation, uint aVersion)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderAvOpenhomeOrgPlaylist1 self = (DvProviderAvOpenhomeOrgPlaylist1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     uint afterId;
     string uri;
     string metadata;
     uint newId;
     try
     {
         invocation.ReadStart();
         afterId = invocation.ReadUint("AfterId");
         uri = invocation.ReadString("Uri");
         metadata = invocation.ReadString("Metadata");
         invocation.ReadEnd();
         self.Insert(aVersion, afterId, uri, metadata, out newId);
     }
     catch (ActionError)
     {
         invocation.ReportError(501, "Invalid XML");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, "Invalid XML");
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2}", e.GetType(), e.Message, e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError can be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteUint("NewId", newId);
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2}", e.GetType(), e.Message, e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
         System.Diagnostics.Process.GetCurrentProcess().Kill();
     }
     return 0;
 }
开发者ID:wifigeek,项目名称:ohNet,代码行数:52,代码来源:DvAvOpenhomeOrgPlaylist1.cs

示例7: DoIdArray

 private static int DoIdArray(IntPtr aPtr, IntPtr aInvocation)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderAvOpenhomeOrgRadio1 self = (DvProviderAvOpenhomeOrgRadio1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     uint token;
     byte[] array;
     try
     {
         invocation.ReadStart();
         invocation.ReadEnd();
         self.IdArray(invocation, out token, out array);
     }
     catch (ActionError e)
     {
         invocation.ReportActionError(e, "IdArray");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, String.Format("Invalid value for property {0}", "IdArray"));
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "IdArray", e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteUint("Token", token);
         invocation.WriteBinary("Array", array);
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "IdArray", e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
     }
     return 0;
 }
开发者ID:nterry,项目名称:ohNet,代码行数:47,代码来源:DvAvOpenhomeOrgRadio1.cs

示例8: DoGetPosition

 private static int DoGetPosition(IntPtr aPtr, IntPtr aInvocation)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderOpenhomeOrgTestLights1 self = (DvProviderOpenhomeOrgTestLights1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     uint index;
     uint x;
     uint y;
     uint z;
     try
     {
         invocation.ReadStart();
         index = invocation.ReadUint("Index");
         invocation.ReadEnd();
         self.GetPosition(invocation, index, out x, out y, out z);
     }
     catch (ActionError e)
     {
         invocation.ReportActionError(e, "GetPosition");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, String.Format("Invalid value for property {0}", "GetPosition"));
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "GetPosition", e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteUint("X", x);
         invocation.WriteUint("Y", y);
         invocation.WriteUint("Z", z);
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "GetPosition", e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
     }
     return 0;
 }
开发者ID:nterry,项目名称:ohNet,代码行数:51,代码来源:DvOpenhomeOrgTestLights1.cs

示例9: DoExportResource

 private static int DoExportResource(IntPtr aPtr, IntPtr aInvocation, uint aVersion)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderUpnpOrgContentDirectory2 self = (DvProviderUpnpOrgContentDirectory2)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     string sourceURI;
     string destinationURI;
     uint transferID;
     try
     {
         invocation.ReadStart();
         sourceURI = invocation.ReadString("SourceURI");
         destinationURI = invocation.ReadString("DestinationURI");
         invocation.ReadEnd();
         self.ExportResource(aVersion, sourceURI, destinationURI, out transferID);
     }
     catch (ActionError)
     {
         invocation.ReportError(501, "Invalid XML");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, "Invalid XML");
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2}", e.GetType(), e.Message, e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError can be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteUint("TransferID", transferID);
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2}", e.GetType(), e.Message, e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
         System.Diagnostics.Process.GetCurrentProcess().Kill();
     }
     return 0;
 }
开发者ID:wifigeek,项目名称:ohNet,代码行数:50,代码来源:DvUpnpOrgContentDirectory2.cs

示例10: DoFreeFormQuery

 private static int DoFreeFormQuery(IntPtr aPtr, IntPtr aInvocation, uint aVersion)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderUpnpOrgContentDirectory3 self = (DvProviderUpnpOrgContentDirectory3)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     string containerID;
     uint cDSView;
     string queryRequest;
     string queryResult;
     uint updateID;
     try
     {
         invocation.ReadStart();
         containerID = invocation.ReadString("ContainerID");
         cDSView = invocation.ReadUint("CDSView");
         queryRequest = invocation.ReadString("QueryRequest");
         invocation.ReadEnd();
         self.FreeFormQuery(aVersion, containerID, cDSView, queryRequest, out queryResult, out updateID);
     }
     catch (ActionError)
     {
         invocation.ReportError(501, "Invalid XML");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, "Invalid XML");
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2}", e.GetType(), e.Message, e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError can be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteString("QueryResult", queryResult);
         invocation.WriteUint("UpdateID", updateID);
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2}", e.GetType(), e.Message, e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
         System.Diagnostics.Process.GetCurrentProcess().Kill();
     }
     return 0;
 }
开发者ID:wifigeek,项目名称:ohNet,代码行数:54,代码来源:DvUpnpOrgContentDirectory3.cs

示例11: DoGetColorComponents

 private static int DoGetColorComponents(IntPtr aPtr, IntPtr aInvocation)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderOpenhomeOrgTestLights1 self = (DvProviderOpenhomeOrgTestLights1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     uint color;
     uint brightness;
     uint red;
     uint green;
     uint blue;
     try
     {
         invocation.ReadStart();
         color = invocation.ReadUint("Color");
         invocation.ReadEnd();
         self.GetColorComponents(invocation, color, out brightness, out red, out green, out blue);
     }
     catch (ActionError e)
     {
         invocation.ReportActionError(e, "GetColorComponents");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, String.Format("Invalid value for property {0}", "GetColorComponents"));
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "GetColorComponents", e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteUint("Brightness", brightness);
         invocation.WriteUint("Red", red);
         invocation.WriteUint("Green", green);
         invocation.WriteUint("Blue", blue);
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "GetColorComponents", e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
     }
     return 0;
 }
开发者ID:nterry,项目名称:ohNet,代码行数:53,代码来源:DvOpenhomeOrgTestLights1.cs

示例12: DoEchoAllowedRangeUint

 private static int DoEchoAllowedRangeUint(IntPtr aPtr, IntPtr aInvocation)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderOpenhomeOrgTestBasic1 self = (DvProviderOpenhomeOrgTestBasic1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     uint value;
     uint result;
     try
     {
         invocation.ReadStart();
         value = invocation.ReadUint("Value");
         invocation.ReadEnd();
         self.EchoAllowedRangeUint(invocation, value, out result);
     }
     catch (ActionError e)
     {
         invocation.ReportActionError(e, "EchoAllowedRangeUint");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, String.Format("Invalid value for property {0}", "EchoAllowedRangeUint"));
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "EchoAllowedRangeUint", e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteUint("Result", result);
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "EchoAllowedRangeUint", e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
     }
     return 0;
 }
开发者ID:Wodath,项目名称:ohNet,代码行数:47,代码来源:DvOpenhomeOrgTestBasic1.cs

示例13: DoCharacteristics

 private static int DoCharacteristics(IntPtr aPtr, IntPtr aInvocation)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderAvOpenhomeOrgVolume1 self = (DvProviderAvOpenhomeOrgVolume1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     uint volumeMax;
     uint volumeUnity;
     uint volumeSteps;
     uint volumeMilliDbPerStep;
     uint balanceMax;
     uint fadeMax;
     try
     {
         invocation.ReadStart();
         invocation.ReadEnd();
         self.Characteristics(invocation, out volumeMax, out volumeUnity, out volumeSteps, out volumeMilliDbPerStep, out balanceMax, out fadeMax);
     }
     catch (ActionError e)
     {
         invocation.ReportActionError(e, "Characteristics");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, String.Format("Invalid value for property {0}", "Characteristics"));
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "Characteristics", e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteUint("VolumeMax", volumeMax);
         invocation.WriteUint("VolumeUnity", volumeUnity);
         invocation.WriteUint("VolumeSteps", volumeSteps);
         invocation.WriteUint("VolumeMilliDbPerStep", volumeMilliDbPerStep);
         invocation.WriteUint("BalanceMax", balanceMax);
         invocation.WriteUint("FadeMax", fadeMax);
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "Characteristics", e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
     }
     return 0;
 }
开发者ID:Wodath,项目名称:ohNet,代码行数:55,代码来源:DvAvOpenhomeOrgVolume1.cs

示例14: DoRenew

 private static int DoRenew(IntPtr aPtr, IntPtr aInvocation)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderOpenhomeOrgSubscriptionLongPoll1 self = (DvProviderOpenhomeOrgSubscriptionLongPoll1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     string sid;
     uint requestedDuration;
     uint duration;
     try
     {
         invocation.ReadStart();
         sid = invocation.ReadString("Sid");
         requestedDuration = invocation.ReadUint("RequestedDuration");
         invocation.ReadEnd();
         self.Renew(invocation, sid, requestedDuration, out duration);
     }
     catch (ActionError e)
     {
         invocation.ReportActionError(e, "Renew");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, String.Format("Invalid value for property {0}", "Renew"));
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "Renew", e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteUint("Duration", duration);
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "Renew", e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
     }
     return 0;
 }
开发者ID:MatthewMiddleweek,项目名称:ohNet,代码行数:49,代码来源:DvOpenhomeOrgSubscriptionLongPoll1.cs

示例15: DoCounters

 private static int DoCounters(IntPtr aPtr, IntPtr aInvocation)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderAvOpenhomeOrgInfo1 self = (DvProviderAvOpenhomeOrgInfo1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     uint trackCount;
     uint detailsCount;
     uint metatextCount;
     try
     {
         invocation.ReadStart();
         invocation.ReadEnd();
         self.Counters(invocation, out trackCount, out detailsCount, out metatextCount);
     }
     catch (ActionError e)
     {
         invocation.ReportActionError(e, "Counters");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, String.Format("Invalid value for property {0}", "Counters"));
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "Counters", e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteUint("TrackCount", trackCount);
         invocation.WriteUint("DetailsCount", detailsCount);
         invocation.WriteUint("MetatextCount", metatextCount);
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "Counters", e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
     }
     return 0;
 }
开发者ID:Wodath,项目名称:ohNet,代码行数:49,代码来源:DvAvOpenhomeOrgInfo1.cs


注:本文中的DvInvocation.WriteUint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。