當前位置: 首頁>>代碼示例>>C#>>正文


C# UPnP.UPnPInvokeException類代碼示例

本文整理匯總了C#中OpenSource.UPnP.UPnPInvokeException的典型用法代碼示例。如果您正苦於以下問題:C# UPnPInvokeException類的具體用法?C# UPnPInvokeException怎麽用?C# UPnPInvokeException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


UPnPInvokeException類屬於OpenSource.UPnP命名空間,在下文中一共展示了UPnPInvokeException類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GetDocumentSink

        private void GetDocumentSink(CpGateKeeper sender, System.String DeviceUDN, System.String ServiceID, System.Byte[] Document, UPnPInvokeException e, object _Tag)
        {
            if(e!=null) return;
            UTF8Encoding U = new UTF8Encoding();

            string XML = U.GetString(Document);
            UPnPService S = (UPnPService)_Tag;

            (new UPnPDebugObject(S)).InvokeNonStaticMethod("ParseSCPD",new object[1]{XML});
            --Counter;
            if(Counter==0)
            {
                if(OnDevice!=null) OnDevice(this,new UPnPRelayDevice(_D,HOME));
            }
        }
開發者ID:amadare,項目名稱:DeveloperToolsForUPnP,代碼行數:15,代碼來源:ProxyDeviceFactory.cs

示例2: CPGetDocumentSink

        private void CPGetDocumentSink(CpGateKeeper sender, System.String DeviceUDN, System.String ServiceID, System.Byte[] Document, UPnPInvokeException e, object _Tag)
        {
            if(e!=null) return;
            UTF8Encoding U = new UTF8Encoding();

            string XML = U.GetString(Document);
            Uri SourceUri = new Uri("http://127.0.0.1");
            IPAddress Intfce = null;

            UPnPDevice d = (UPnPDevice)(new UPnPDebugObject(typeof(OpenSource.UPnP.UPnPDevice))).InvokeStaticMethod("Parse",new object[3]
                {XML,SourceUri,Intfce});

            ProxyDeviceFactory df = new ProxyDeviceFactory(sender,d,new ProxyDeviceFactory.OnDeviceHandler(NewDeviceSink));
            ProxyFactoryTable[df] = df;
        }
開發者ID:amadare,項目名稱:DeveloperToolsForUPnP,代碼行數:15,代碼來源:Gatekeeper.cs

示例3: Error_Sink_SetVerticalKeystone

 private void Error_Sink_SetVerticalKeystone(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, int Handle)
 {
     if(OnResult_SetVerticalKeystone != null)
     {
          OnResult_SetVerticalKeystone((System.UInt32 )Args[0].DataValue, (System.Int16 )Args[1].DataValue, e, Handle);
     }
     WeakReference[] w = (WeakReference[])WeakList_SetVerticalKeystone.ToArray(typeof(WeakReference));
     foreach(WeakReference wr in w)
     {
         if(wr.IsAlive==true)
         {
            ((Delegate_OnResult_SetVerticalKeystone)wr.Target)((System.UInt32 )Args[0].DataValue, (System.Int16 )Args[1].DataValue, e, Handle);
         }
         else
         {
             WeakList_SetVerticalKeystone.Remove(wr);
         }
     }
 }
開發者ID:nothingmn,項目名稱:UPnP-for-C---Intel-,代碼行數:19,代碼來源:CpRenderingControl.cs

示例4: Error_Sink_SelectPreset

 private void Error_Sink_SelectPreset(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, int Handle)
 {
     for(int i=0;i<Args.Length;++i)
     {
         switch(Args[i].Name)
         {
             case "PresetName":
                 switch((string)Args[i].DataValue)
                 {
                     case "FactoryDefaults":
                         Args[i].DataValue = Enum_A_ARG_TYPE_PresetName.FACTORYDEFAULTS;
                         break;
                     case "InstallationDefaults":
                         Args[i].DataValue = Enum_A_ARG_TYPE_PresetName.INSTALLATIONDEFAULTS;
                         break;
                     case "Vendor defined":
                         Args[i].DataValue = Enum_A_ARG_TYPE_PresetName.VENDOR_DEFINED;
                         break;
                 }
                 break;
         }
     }
     if(OnResult_SelectPreset != null)
     {
          OnResult_SelectPreset((System.UInt32 )Args[0].DataValue, (Enum_A_ARG_TYPE_PresetName )Args[1].DataValue, e, Handle);
     }
     WeakReference[] w = (WeakReference[])WeakList_SelectPreset.ToArray(typeof(WeakReference));
     foreach(WeakReference wr in w)
     {
         if(wr.IsAlive==true)
         {
            ((Delegate_OnResult_SelectPreset)wr.Target)((System.UInt32 )Args[0].DataValue, (Enum_A_ARG_TYPE_PresetName )Args[1].DataValue, e, Handle);
         }
         else
         {
             WeakList_SelectPreset.Remove(wr);
         }
     }
 }
開發者ID:nothingmn,項目名稱:UPnP-for-C---Intel-,代碼行數:39,代碼來源:CpRenderingControl.cs

示例5: ResultImportResource2SinkEx

 private void ResultImportResource2SinkEx(System.Uri importFromThis, IUPnPMedia owner, IMediaResource importToThis, IResourceTransfer transferObject, object Tag, UPnPInvokeException error)
 {
     new TransferForm(transferObject).Show();
 }
開發者ID:evolution124,項目名稱:Developer-Tools-for-UPnP-Technologies,代碼行數:4,代碼來源:MainForm.cs

示例6: ResultDestroyObjectSink

 private void ResultDestroyObjectSink(ICpMedia destroyThis, object Tag, UPnPInvokeException error)
 {
     MessageBox.Show(this, "Media " + destroyThis.Title + " Deleted","Delete Media");
 }
開發者ID:evolution124,項目名稱:Developer-Tools-for-UPnP-Technologies,代碼行數:4,代碼來源:MainForm.cs

示例7: OnBrowseDone

        /// <summary>
        /// Processes the results of Browse requests.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="ObjectID"></param>
        /// <param name="BrowseFlag"></param>
        /// <param name="Filter"></param>
        /// <param name="StartingIndex"></param>
        /// <param name="RequestedCount"></param>
        /// <param name="SortCriteria"></param>
        /// <param name="Result"></param>
        /// <param name="NumberReturned"></param>
        /// <param name="TotalMatches"></param>
        /// <param name="UpdateID"></param>
        /// <param name="e"></param>
        /// <param name="_Tag"></param>
        private void OnBrowseDone(CpContentDirectory sender, System.String ObjectID, OpenSource.UPnP.AV.CpContentDirectory.Enum_A_ARG_TYPE_BrowseFlag BrowseFlag, System.String Filter, System.UInt32 StartingIndex, System.UInt32 RequestedCount, System.String SortCriteria, System.String Result, System.UInt32 NumberReturned, System.UInt32 TotalMatches, System.UInt32 UpdateID, UPnPInvokeException e, object _Tag)
        {
            _RequestState state = (_RequestState) _Tag;
            if (e != null)
            {
                if (state.Callback_Browse1 != null)
                {
                    state.Callback_Browse1(this, ObjectID, BrowseFlag, Filter, StartingIndex, RequestedCount, SortCriteria, e, null, state.Tag, null, NumberReturned, TotalMatches, UpdateID);
                }
                else if (state.Callback_Browse2 != null)
                {
                    state.Callback_Browse2(this, e, null, state.Tag, null, NumberReturned, TotalMatches, UpdateID);
                }
            }
            else
            {
                ArrayList al = null;
                try
                {
                    al = CpMediaBuilder.BuildMediaBranches(Result);
                }
                catch (Exception parseError)
                {
                    if (state.Callback_Browse1 != null)
                    {
                        state.Callback_Browse1(this, ObjectID, BrowseFlag, Filter, StartingIndex, RequestedCount, SortCriteria, e, parseError, state.Tag, null, NumberReturned, TotalMatches, UpdateID);
                    }
                    else if (state.Callback_Browse2 != null)
                    {
                        state.Callback_Browse2(this, e, parseError, state.Tag, null, NumberReturned, TotalMatches, UpdateID);
                    }
                    al = null;
                }

                if (al != null)
                {
                    if (state.Callback_Browse1 != null)
                    {
                        state.Callback_Browse1(this, ObjectID, BrowseFlag, Filter, StartingIndex, RequestedCount, SortCriteria, e, null, state.Tag, (IUPnPMedia[]) al.ToArray(typeof(IUPnPMedia)), NumberReturned, TotalMatches, UpdateID);
                    }
                    else if (state.Callback_Browse2 != null)
                    {
                        state.Callback_Browse2(this, e, null, state.Tag, (IUPnPMedia[]) al.ToArray(typeof(IUPnPMedia)), NumberReturned, TotalMatches, UpdateID);
                    }
                }
            }
        }
開發者ID:amadare,項目名稱:DeveloperToolsForUPnP,代碼行數:63,代碼來源:CpMediaServer.cs

示例8: Error_Sink_GetProtocolInfo

 private void Error_Sink_GetProtocolInfo(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, int Handle)
 {
     if(OnResult_GetProtocolInfo != null)
     {
          OnResult_GetProtocolInfo((System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), e, Handle);
     }
     WeakReference[] w = (WeakReference[])WeakList_GetProtocolInfo.ToArray(typeof(WeakReference));
     foreach(WeakReference wr in w)
     {
         if(wr.IsAlive==true)
         {
            ((Delegate_OnResult_GetProtocolInfo)wr.Target)((System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), e, Handle);
         }
         else
         {
             WeakList_GetProtocolInfo.Remove(wr);
         }
     }
 }
開發者ID:nothingmn,項目名稱:UPnP-for-C---Intel-,代碼行數:19,代碼來源:CpConnectionManager.cs

示例9: Error_Sink_Play

 private void Error_Sink_Play(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, object _Tag)
 {
     for(int i=0;i<Args.Length;++i)
     {
         switch(Args[i].Name)
         {
             case "Speed":
                 switch((string)Args[i].DataValue)
                 {
                     case "1":
                         Args[i].DataValue = Enum_TransportPlaySpeed._1;
                         break;
                     case " vendor-defined ":
                         Args[i].DataValue = Enum_TransportPlaySpeed._VENDOR_DEFINED_;
                         break;
                 }
                 break;
         }
     }
     object[] StateInfo = (object[])_Tag;
     if (StateInfo[1]!=null)
     {
         ((Delegate_OnResult_Play)StateInfo[1])(this, (System.UInt32 )Args[0].DataValue, (Enum_TransportPlaySpeed )Args[1].DataValue, e, StateInfo[0]);
     }
     else
     {
         OnResult_Play_Event.Fire(this, (System.UInt32 )Args[0].DataValue, (Enum_TransportPlaySpeed )Args[1].DataValue, e, StateInfo[0]);
     }
 }
開發者ID:GufCab,項目名稱:Semester-Projekt---Test-Kode,代碼行數:29,代碼來源:CpAVTransport.cs

示例10: Error_Sink_GetTransportSettings

 private void Error_Sink_GetTransportSettings(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, object _Tag)
 {
     object[] StateInfo = (object[])_Tag;
     if (StateInfo[1]!=null)
     {
         ((Delegate_OnResult_GetTransportSettings)StateInfo[1])(this, (System.UInt32 )Args[0].DataValue, (Enum_CurrentPlayMode)0, (Enum_CurrentRecordQualityMode)0, e, StateInfo[0]);
     }
     else
     {
         OnResult_GetTransportSettings_Event.Fire(this, (System.UInt32 )Args[0].DataValue, (Enum_CurrentPlayMode)0, (Enum_CurrentRecordQualityMode)0, e, StateInfo[0]);
     }
 }
開發者ID:GufCab,項目名稱:Semester-Projekt---Test-Kode,代碼行數:12,代碼來源:CpAVTransport.cs

示例11: Error_Sink_GetTransportInfo

 private void Error_Sink_GetTransportInfo(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, object _Tag)
 {
     object[] StateInfo = (object[])_Tag;
     if (StateInfo[1]!=null)
     {
         ((Delegate_OnResult_GetTransportInfo)StateInfo[1])(this, (System.UInt32 )Args[0].DataValue, (Enum_TransportState)0, (Enum_TransportStatus)0, (Enum_TransportPlaySpeed)0, e, StateInfo[0]);
     }
     else
     {
         OnResult_GetTransportInfo_Event.Fire(this, (System.UInt32 )Args[0].DataValue, (Enum_TransportState)0, (Enum_TransportStatus)0, (Enum_TransportPlaySpeed)0, e, StateInfo[0]);
     }
 }
開發者ID:GufCab,項目名稱:Semester-Projekt---Test-Kode,代碼行數:12,代碼來源:CpAVTransport.cs

示例12: Error_Sink_GetMediaInfo

 private void Error_Sink_GetMediaInfo(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, object _Tag)
 {
     object[] StateInfo = (object[])_Tag;
     if (StateInfo[1]!=null)
     {
         ((Delegate_OnResult_GetMediaInfo)StateInfo[1])(this, (System.UInt32 )Args[0].DataValue, (System.UInt32)UPnPService.CreateObjectInstance(typeof(System.UInt32),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (Enum_PlaybackStorageMedium)0, (Enum_RecordStorageMedium)0, (Enum_RecordMediumWriteStatus)0, e, StateInfo[0]);
     }
     else
     {
         OnResult_GetMediaInfo_Event.Fire(this, (System.UInt32 )Args[0].DataValue, (System.UInt32)UPnPService.CreateObjectInstance(typeof(System.UInt32),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (Enum_PlaybackStorageMedium)0, (Enum_RecordStorageMedium)0, (Enum_RecordMediumWriteStatus)0, e, StateInfo[0]);
     }
 }
開發者ID:GufCab,項目名稱:Semester-Projekt---Test-Kode,代碼行數:12,代碼來源:CpAVTransport.cs

示例13: InvokeFailedSink

		private void InvokeFailedSink(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, object Tag)
		{
			Arguments = Args;
			InvokeException = e;
			Result.Set();
		}
開發者ID:Scannow,項目名稱:SWYH,代碼行數:6,代碼來源:SyncInvokeAdapter.cs

示例14: Error_Sink_GetIPAddress

 private void Error_Sink_GetIPAddress(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, object _Tag)
 {
     object[] StateInfo = (object[])_Tag;
     if (StateInfo[1]!=null)
     {
         ((Delegate_OnResult_GetIPAddress)StateInfo[1])(this, (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), e, StateInfo[0]);
     }
     else
     {
         OnResult_GetIPAddress_Event.Fire(this, (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), e, StateInfo[0]);
     }
 }
開發者ID:GufCab,項目名稱:Semester-Projekt---PC-Program,代碼行數:12,代碼來源:CpConnectionManager.cs

示例15: Error_Sink_SetVolumeDB

 private void Error_Sink_SetVolumeDB(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, object _Tag)
 {
     for(int i=0;i<Args.Length;++i)
     {
         switch(Args[i].Name)
         {
             case "Channel":
                 switch((string)Args[i].DataValue)
                 {
                     case "Master":
                         Args[i].DataValue = Enum_A_ARG_TYPE_Channel.MASTER;
                         break;
                     case "LF":
                         Args[i].DataValue = Enum_A_ARG_TYPE_Channel.LF;
                         break;
                     case "RF":
                         Args[i].DataValue = Enum_A_ARG_TYPE_Channel.RF;
                         break;
                 }
                 break;
         }
     }
     object[] StateInfo = (object[])_Tag;
     if (StateInfo[1]!=null)
     {
         ((Delegate_OnResult_SetVolumeDB)StateInfo[1])(this, (System.UInt32 )Args[0].DataValue, (Enum_A_ARG_TYPE_Channel )Args[1].DataValue, (System.Int16 )Args[2].DataValue, e, StateInfo[0]);
     }
     else
     {
         OnResult_SetVolumeDB_Event.Fire(this, (System.UInt32 )Args[0].DataValue, (Enum_A_ARG_TYPE_Channel )Args[1].DataValue, (System.Int16 )Args[2].DataValue, e, StateInfo[0]);
     }
 }
開發者ID:GufCab,項目名稱:Semester-Projekt---Test-Kode,代碼行數:32,代碼來源:CpRenderingControl.cs


注:本文中的OpenSource.UPnP.UPnPInvokeException類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。