Click here to Skip to main content
15,885,998 members
Articles / Programming Languages / C# 4.0

Dynamically Loading Silverlight Video Players using MEF

,
Rate me:
Please Sign up or sign in to vote.
4.97/5 (10 votes)
24 Aug 2010Ms-PL8 min read 55.3K   2.7K   16  
An example using MEF to dynamically load Silverlight Video Players
  • completeprojectwithallsamplevideoplayers.zip
    • PhilMiddlemissTheme
    • SkinableVideoPlayer.sln
    • SkinableVideoPlayer.Web
    • SkinableVideoPlayer
      • App.xaml
      • App.xaml.cs
      • Bin
        • Debug
          • AppManifest.xaml
          • ar
            • System.Windows.Controls.resources.dll
          • bg
            • System.Windows.Controls.resources.dll
          • ca
            • System.Windows.Controls.resources.dll
          • cs
            • System.Windows.Controls.resources.dll
          • da
            • System.Windows.Controls.resources.dll
          • de
            • System.ComponentModel.Composition.Initialization.resources.dll
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • el
            • System.Windows.Controls.resources.dll
          • es
            • System.ComponentModel.Composition.Initialization.resources.dll
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • et
            • System.Windows.Controls.resources.dll
          • eu
            • System.Windows.Controls.resources.dll
          • fi
            • System.Windows.Controls.resources.dll
          • fr
            • System.ComponentModel.Composition.Initialization.resources.dll
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • he
            • System.Windows.Controls.resources.dll
          • hr
            • System.Windows.Controls.resources.dll
          • hu
            • System.Windows.Controls.resources.dll
          • id
            • System.Windows.Controls.resources.dll
          • it
            • System.ComponentModel.Composition.Initialization.resources.dll
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • ja
            • System.ComponentModel.Composition.Initialization.resources.dll
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • ko
            • System.ComponentModel.Composition.Initialization.resources.dll
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • lt
            • System.Windows.Controls.resources.dll
          • lv
            • System.Windows.Controls.resources.dll
          • Microsoft.Expression.Interactions.dll
          • Microsoft.Expression.Interactions.xml
          • ms
            • System.Windows.Controls.resources.dll
          • nl
            • System.Windows.Controls.resources.dll
          • no
            • System.Windows.Controls.resources.dll
          • pl
            • System.Windows.Controls.resources.dll
          • pt
            • System.Windows.Controls.resources.dll
          • pt-BR
            • System.Windows.Controls.resources.dll
          • ro
            • System.Windows.Controls.resources.dll
          • ru
            • System.ComponentModel.Composition.Initialization.resources.dll
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • sk
            • System.Windows.Controls.resources.dll
          • SkinableVideoPlayer.dll
          • SkinableVideoPlayer.xap
          • SkinableVideoPlayerTestPage.html
          • SkinableVideoPlayerViewModel.dll
          • sl
            • System.Windows.Controls.resources.dll
          • sr-Cyrl-CS
            • System.Windows.Controls.resources.dll
          • sr-Latn-CS
            • System.Windows.Controls.resources.dll
          • sv
            • System.Windows.Controls.resources.dll
          • System.ComponentModel.Composition.dll
          • System.ComponentModel.Composition.Initialization.dll
          • System.ComponentModel.Composition.Initialization.xml
          • System.ComponentModel.Composition.xml
          • System.CoreEx.dll
          • System.Observable.dll
          • System.Reactive.dll
          • System.Windows.Controls.dll
          • System.Windows.Controls.Toolkit.dll
          • System.Windows.Controls.Toolkit.Internals.dll
          • System.Windows.Controls.Toolkit.xml
          • System.Windows.Controls.xml
          • System.Windows.Interactivity.dll
          • System.Windows.Interactivity.xml
          • th
            • System.Windows.Controls.resources.dll
          • tr
            • System.Windows.Controls.resources.dll
          • uk
            • System.Windows.Controls.resources.dll
          • vi
            • System.Windows.Controls.resources.dll
          • zh-Hans
            • System.ComponentModel.Composition.Initialization.resources.dll
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • zh-Hant
            • System.ComponentModel.Composition.Initialization.resources.dll
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
        • Release
      • classes
      • Models
      • Properties
      • Service References
        • wsSkinableVideoPlayer
          • configuration.svcinfo
          • configuration91.svcinfo
          • Reference.cs
          • Reference.svcmap
          • SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosResponse.datasource
          • SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsResponse.datasource
          • WebService.disco
          • WebService.wsdl
      • ServiceReferences.ClientConfig
      • SkinableVideoPlayer.csproj
      • SkinableVideoPlayer.csproj.user
      • ViewModels
      • Views
    • SkinableVideoPlayer_View
    • SkinableVideoPlayerViewModel
      • Bin
        • Debug
          • ar
          • bg
          • ca
          • cs
          • da
          • de
          • el
          • es
          • et
          • eu
          • fi
          • fr
          • he
          • hr
          • hu
          • id
          • it
          • ja
          • ko
          • lt
          • lv
          • ms
          • nl
          • no
          • pl
          • pt
          • pt-BR
          • ro
          • ru
          • sk
          • SkinableVideoPlayerViewModel.dll
          • sl
          • sr-Cyrl-CS
          • sr-Latn-CS
          • sv
          • th
          • tr
          • uk
          • vi
          • zh-Hans
          • zh-Hant
        • Release
      • ClassDiagram1.cd
      • classes
      • Model
      • Properties
      • Service References
        • wsSkinableVideoPlayer
          • configuration.svcinfo
          • configuration91.svcinfo
          • Reference.cs
          • Reference.svcmap
          • SkinableVideoPlayerViewModel.wsSkinableVideoPlayer.GetVideosResponse.datasource
          • SkinableVideoPlayerViewModel.wsSkinableVideoPlayer.GetXapsResponse.datasource
          • WebService.disco
          • WebService.wsdl
      • ServiceReferences.ClientConfig
      • SkinableVideoPlayerViewModel.csproj
      • SkinableVideoPlayerViewModel.csproj.user
      • ViewModel
  • versionone.zip
    • SkinableVideoPlayer.sln
    • WebService.cs
    • SkinableVideoPlayer.xap
    • VersionOne.xap
    • Default.aspx
    • Silverlight.js
    • desktop.ini
    • niceday.wmv
    • Thumbs.db
    • web.config
    • WebService.asmx
    • App.xaml
    • App.xaml.cs
    • AppManifest.xaml
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • Microsoft.Expression.Interactions.dll
    • Microsoft.Expression.Interactions.xml
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • SkinableVideoPlayer.dll
    • SkinableVideoPlayer.xap
    • SkinableVideoPlayerTestPage.html
    • SkinableVideoPlayerViewModel.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.dll
    • System.ComponentModel.Composition.Initialization.dll
    • System.ComponentModel.Composition.Initialization.xml
    • System.ComponentModel.Composition.xml
    • System.Windows.Controls.dll
    • System.Windows.Controls.Toolkit.dll
    • System.Windows.Controls.Toolkit.Internals.dll
    • System.Windows.Controls.Toolkit.xml
    • System.Windows.Controls.xml
    • System.Windows.Interactivity.dll
    • System.Windows.Interactivity.xml
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • DelegateCommand.cs
    • DeploymentCatalogService.cs
    • Extensions.cs
    • SilverlightXaps.cs
    • AppManifest.xml
    • AssemblyInfo.cs
    • configuration.svcinfo
    • configuration91.svcinfo
    • Reference.cs
    • Reference.svcmap
    • SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosResponse.datasource
    • SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsResponse.datasource
    • WebService.disco
    • WebService.wsdl
    • ServiceReferences.ClientConfig
    • SkinableVideoPlayer.csproj
    • SkinableVideoPlayer.csproj.user
    • MainPageModel.cs
    • MainPage.xaml
    • MainPage.xaml.cs
    • SkinableVideoPlayerViewModel.dll
    • SkinableVideoPlayerViewModel.pdb
    • DelegateCommand.cs
    • SilverlightVideos.cs
    • obj
    • VersionOne
      • App.xaml
      • App.xaml.cs
      • Bin
        • Debug
          • AppManifest.xaml
          • ar
            • System.Windows.Controls.resources.dll
          • bg
            • System.Windows.Controls.resources.dll
          • ca
            • System.Windows.Controls.resources.dll
          • cs
            • System.Windows.Controls.resources.dll
          • da
            • System.Windows.Controls.resources.dll
          • de
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • el
            • System.Windows.Controls.resources.dll
          • es
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • et
            • System.Windows.Controls.resources.dll
          • eu
            • System.Windows.Controls.resources.dll
          • fi
            • System.Windows.Controls.resources.dll
          • fr
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • he
            • System.Windows.Controls.resources.dll
          • hr
            • System.Windows.Controls.resources.dll
          • hu
            • System.Windows.Controls.resources.dll
          • id
            • System.Windows.Controls.resources.dll
          • it
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • ja
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • ko
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • lt
            • System.Windows.Controls.resources.dll
          • lv
            • System.Windows.Controls.resources.dll
          • ms
            • System.Windows.Controls.resources.dll
          • nl
            • System.Windows.Controls.resources.dll
          • no
            • System.Windows.Controls.resources.dll
          • pl
            • System.Windows.Controls.resources.dll
          • pt
            • System.Windows.Controls.resources.dll
          • pt-BR
            • System.Windows.Controls.resources.dll
          • ro
            • System.Windows.Controls.resources.dll
          • ru
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • sk
            • System.Windows.Controls.resources.dll
          • sl
            • System.Windows.Controls.resources.dll
          • sr-Cyrl-CS
            • System.Windows.Controls.resources.dll
          • sr-Latn-CS
            • System.Windows.Controls.resources.dll
          • sv
            • System.Windows.Controls.resources.dll
          • System.ComponentModel.Composition.dll
          • System.ComponentModel.Composition.xml
          • System.Windows.Controls.dll
          • System.Windows.Controls.Toolkit.dll
          • System.Windows.Controls.Toolkit.Internals.dll
          • System.Windows.Controls.Toolkit.pdb
          • System.Windows.Controls.Toolkit.xml
          • System.Windows.Controls.xml
          • System.Windows.Interactivity.dll
          • System.Windows.Interactivity.xml
          • th
            • System.Windows.Controls.resources.dll
          • tr
            • System.Windows.Controls.resources.dll
          • uk
            • System.Windows.Controls.resources.dll
          • VersionOne.dll
          • VersionOne.pdb
          • VersionOne.xap
          • VersionOneTestPage.html
          • vi
            • System.Windows.Controls.resources.dll
          • zh-Hans
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
          • zh-Hant
            • System.ComponentModel.Composition.resources.dll
            • System.Windows.Controls.resources.dll
        • Release
      • obj
      • Properties
      • VersionOne.csproj
      • VersionOne.csproj.user
      • Views
  • base.zip
    • SkinableVideoPlayer.sln
    • WebService.cs
    • SkinableVideoPlayer.xap
    • Default.aspx
    • Silverlight.js
    • desktop.ini
    • niceday.wmv
    • Thumbs.db
    • web.config
    • WebService.asmx
    • App.xaml
    • App.xaml.cs
    • AppManifest.xaml
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • Microsoft.Expression.Interactions.dll
    • Microsoft.Expression.Interactions.xml
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • SkinableVideoPlayer.dll
    • SkinableVideoPlayer.xap
    • SkinableVideoPlayerTestPage.html
    • SkinableVideoPlayerViewModel.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.dll
    • System.ComponentModel.Composition.Initialization.dll
    • System.ComponentModel.Composition.Initialization.xml
    • System.ComponentModel.Composition.xml
    • System.Windows.Controls.dll
    • System.Windows.Controls.Toolkit.dll
    • System.Windows.Controls.Toolkit.Internals.dll
    • System.Windows.Controls.Toolkit.xml
    • System.Windows.Controls.xml
    • System.Windows.Interactivity.dll
    • System.Windows.Interactivity.xml
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • System.ComponentModel.Composition.Initialization.resources.dll
    • System.ComponentModel.Composition.resources.dll
    • System.Windows.Controls.resources.dll
    • DelegateCommand.cs
    • DeploymentCatalogService.cs
    • Extensions.cs
    • SilverlightXaps.cs
    • AppManifest.xml
    • AssemblyInfo.cs
    • configuration.svcinfo
    • configuration91.svcinfo
    • Reference.cs
    • Reference.svcmap
    • SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosResponse.datasource
    • SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsResponse.datasource
    • WebService.disco
    • WebService.wsdl
    • ServiceReferences.ClientConfig
    • SkinableVideoPlayer.csproj
    • SkinableVideoPlayer.csproj.user
    • MainPageModel.cs
    • MainPage.xaml
    • MainPage.xaml.cs
    • SkinableVideoPlayerViewModel.dll
    • DelegateCommand.cs
    • SilverlightVideos.cs
    • AssemblyInfo.cs
    • configuration.svcinfo
    • configuration91.svcinfo
    • Reference.cs
    • Reference.svcmap
    • SkinableVideoPlayerViewModel.wsSkinableVideoPlayer.GetVideosResponse.datasource
    • SkinableVideoPlayerViewModel.wsSkinableVideoPlayer.GetXapsResponse.datasource
    • WebService.disco
    • WebService.wsdl
    • ServiceReferences.ClientConfig
    • SkinableVideoPlayerViewModel.csproj
    • SkinableVideoPlayerViewModel.csproj.user
    • MainViewModel.cs
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.1
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

// 
// This code was auto-generated by Microsoft.Silverlight.ServiceReference, version 4.0.50401.0
// 
namespace SkinableVideoPlayer.wsSkinableVideoPlayer {
    using System.Runtime.Serialization;
    
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.CollectionDataContractAttribute(Name="ArrayOfString", Namespace="http://OpenLightGroup.net/", ItemName="string")]
    public class ArrayOfString : System.Collections.ObjectModel.ObservableCollection<string> {
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(Namespace="http://OpenLightGroup.net/", ConfigurationName="wsSkinableVideoPlayer.WebServiceSoap")]
    public interface WebServiceSoap {
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://OpenLightGroup.net/GetVideos", ReplyAction="*")]
        System.IAsyncResult BeginGetVideos(SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosRequest request, System.AsyncCallback callback, object asyncState);
        
        SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosResponse EndGetVideos(System.IAsyncResult result);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://OpenLightGroup.net/GetXaps", ReplyAction="*")]
        System.IAsyncResult BeginGetXaps(SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsRequest request, System.AsyncCallback callback, object asyncState);
        
        SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsResponse EndGetXaps(System.IAsyncResult result);
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class GetVideosRequest {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Name="GetVideos", Namespace="http://OpenLightGroup.net/", Order=0)]
        public SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosRequestBody Body;
        
        public GetVideosRequest() {
        }
        
        public GetVideosRequest(SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosRequestBody Body) {
            this.Body = Body;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute()]
    public partial class GetVideosRequestBody {
        
        public GetVideosRequestBody() {
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class GetVideosResponse {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Name="GetVideosResponse", Namespace="http://OpenLightGroup.net/", Order=0)]
        public SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosResponseBody Body;
        
        public GetVideosResponse() {
        }
        
        public GetVideosResponse(SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosResponseBody Body) {
            this.Body = Body;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute(Namespace="http://OpenLightGroup.net/")]
    public partial class GetVideosResponseBody {
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
        public SkinableVideoPlayer.wsSkinableVideoPlayer.ArrayOfString GetVideosResult;
        
        public GetVideosResponseBody() {
        }
        
        public GetVideosResponseBody(SkinableVideoPlayer.wsSkinableVideoPlayer.ArrayOfString GetVideosResult) {
            this.GetVideosResult = GetVideosResult;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class GetXapsRequest {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Name="GetXaps", Namespace="http://OpenLightGroup.net/", Order=0)]
        public SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsRequestBody Body;
        
        public GetXapsRequest() {
        }
        
        public GetXapsRequest(SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsRequestBody Body) {
            this.Body = Body;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute()]
    public partial class GetXapsRequestBody {
        
        public GetXapsRequestBody() {
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class GetXapsResponse {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Name="GetXapsResponse", Namespace="http://OpenLightGroup.net/", Order=0)]
        public SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsResponseBody Body;
        
        public GetXapsResponse() {
        }
        
        public GetXapsResponse(SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsResponseBody Body) {
            this.Body = Body;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute(Namespace="http://OpenLightGroup.net/")]
    public partial class GetXapsResponseBody {
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
        public SkinableVideoPlayer.wsSkinableVideoPlayer.ArrayOfString GetXapsResult;
        
        public GetXapsResponseBody() {
        }
        
        public GetXapsResponseBody(SkinableVideoPlayer.wsSkinableVideoPlayer.ArrayOfString GetXapsResult) {
            this.GetXapsResult = GetXapsResult;
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface WebServiceSoapChannel : SkinableVideoPlayer.wsSkinableVideoPlayer.WebServiceSoap, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetVideosCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetVideosCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public SkinableVideoPlayer.wsSkinableVideoPlayer.ArrayOfString Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((SkinableVideoPlayer.wsSkinableVideoPlayer.ArrayOfString)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GetXapsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GetXapsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public SkinableVideoPlayer.wsSkinableVideoPlayer.ArrayOfString Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((SkinableVideoPlayer.wsSkinableVideoPlayer.ArrayOfString)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class WebServiceSoapClient : System.ServiceModel.ClientBase<SkinableVideoPlayer.wsSkinableVideoPlayer.WebServiceSoap>, SkinableVideoPlayer.wsSkinableVideoPlayer.WebServiceSoap {
        
        private BeginOperationDelegate onBeginGetVideosDelegate;
        
        private EndOperationDelegate onEndGetVideosDelegate;
        
        private System.Threading.SendOrPostCallback onGetVideosCompletedDelegate;
        
        private BeginOperationDelegate onBeginGetXapsDelegate;
        
        private EndOperationDelegate onEndGetXapsDelegate;
        
        private System.Threading.SendOrPostCallback onGetXapsCompletedDelegate;
        
        private BeginOperationDelegate onBeginOpenDelegate;
        
        private EndOperationDelegate onEndOpenDelegate;
        
        private System.Threading.SendOrPostCallback onOpenCompletedDelegate;
        
        private BeginOperationDelegate onBeginCloseDelegate;
        
        private EndOperationDelegate onEndCloseDelegate;
        
        private System.Threading.SendOrPostCallback onCloseCompletedDelegate;
        
        public WebServiceSoapClient() {
        }
        
        public WebServiceSoapClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public WebServiceSoapClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public WebServiceSoapClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public WebServiceSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress) {
        }
        
        public System.Net.CookieContainer CookieContainer {
            get {
                System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
                if ((httpCookieContainerManager != null)) {
                    return httpCookieContainerManager.CookieContainer;
                }
                else {
                    return null;
                }
            }
            set {
                System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
                if ((httpCookieContainerManager != null)) {
                    httpCookieContainerManager.CookieContainer = value;
                }
                else {
                    throw new System.InvalidOperationException("Unable to set the CookieContainer. Please make sure the binding contains an HttpC" +
                            "ookieContainerBindingElement.");
                }
            }
        }
        
        public event System.EventHandler<GetVideosCompletedEventArgs> GetVideosCompleted;
        
        public event System.EventHandler<GetXapsCompletedEventArgs> GetXapsCompleted;
        
        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> OpenCompleted;
        
        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> CloseCompleted;
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult SkinableVideoPlayer.wsSkinableVideoPlayer.WebServiceSoap.BeginGetVideos(SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosRequest request, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetVideos(request, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        private System.IAsyncResult BeginGetVideos(System.AsyncCallback callback, object asyncState) {
            SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosRequest inValue = new SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosRequest();
            inValue.Body = new SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosRequestBody();
            return ((SkinableVideoPlayer.wsSkinableVideoPlayer.WebServiceSoap)(this)).BeginGetVideos(inValue, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosResponse SkinableVideoPlayer.wsSkinableVideoPlayer.WebServiceSoap.EndGetVideos(System.IAsyncResult result) {
            return base.Channel.EndGetVideos(result);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        private SkinableVideoPlayer.wsSkinableVideoPlayer.ArrayOfString EndGetVideos(System.IAsyncResult result) {
            SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosResponse retVal = ((SkinableVideoPlayer.wsSkinableVideoPlayer.WebServiceSoap)(this)).EndGetVideos(result);
            return retVal.Body.GetVideosResult;
        }
        
        private System.IAsyncResult OnBeginGetVideos(object[] inValues, System.AsyncCallback callback, object asyncState) {
            return this.BeginGetVideos(callback, asyncState);
        }
        
        private object[] OnEndGetVideos(System.IAsyncResult result) {
            SkinableVideoPlayer.wsSkinableVideoPlayer.ArrayOfString retVal = this.EndGetVideos(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetVideosCompleted(object state) {
            if ((this.GetVideosCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetVideosCompleted(this, new GetVideosCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetVideosAsync() {
            this.GetVideosAsync(null);
        }
        
        public void GetVideosAsync(object userState) {
            if ((this.onBeginGetVideosDelegate == null)) {
                this.onBeginGetVideosDelegate = new BeginOperationDelegate(this.OnBeginGetVideos);
            }
            if ((this.onEndGetVideosDelegate == null)) {
                this.onEndGetVideosDelegate = new EndOperationDelegate(this.OnEndGetVideos);
            }
            if ((this.onGetVideosCompletedDelegate == null)) {
                this.onGetVideosCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetVideosCompleted);
            }
            base.InvokeAsync(this.onBeginGetVideosDelegate, null, this.onEndGetVideosDelegate, this.onGetVideosCompletedDelegate, userState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult SkinableVideoPlayer.wsSkinableVideoPlayer.WebServiceSoap.BeginGetXaps(SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsRequest request, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGetXaps(request, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        private System.IAsyncResult BeginGetXaps(System.AsyncCallback callback, object asyncState) {
            SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsRequest inValue = new SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsRequest();
            inValue.Body = new SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsRequestBody();
            return ((SkinableVideoPlayer.wsSkinableVideoPlayer.WebServiceSoap)(this)).BeginGetXaps(inValue, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsResponse SkinableVideoPlayer.wsSkinableVideoPlayer.WebServiceSoap.EndGetXaps(System.IAsyncResult result) {
            return base.Channel.EndGetXaps(result);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        private SkinableVideoPlayer.wsSkinableVideoPlayer.ArrayOfString EndGetXaps(System.IAsyncResult result) {
            SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsResponse retVal = ((SkinableVideoPlayer.wsSkinableVideoPlayer.WebServiceSoap)(this)).EndGetXaps(result);
            return retVal.Body.GetXapsResult;
        }
        
        private System.IAsyncResult OnBeginGetXaps(object[] inValues, System.AsyncCallback callback, object asyncState) {
            return this.BeginGetXaps(callback, asyncState);
        }
        
        private object[] OnEndGetXaps(System.IAsyncResult result) {
            SkinableVideoPlayer.wsSkinableVideoPlayer.ArrayOfString retVal = this.EndGetXaps(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGetXapsCompleted(object state) {
            if ((this.GetXapsCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetXapsCompleted(this, new GetXapsCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GetXapsAsync() {
            this.GetXapsAsync(null);
        }
        
        public void GetXapsAsync(object userState) {
            if ((this.onBeginGetXapsDelegate == null)) {
                this.onBeginGetXapsDelegate = new BeginOperationDelegate(this.OnBeginGetXaps);
            }
            if ((this.onEndGetXapsDelegate == null)) {
                this.onEndGetXapsDelegate = new EndOperationDelegate(this.OnEndGetXaps);
            }
            if ((this.onGetXapsCompletedDelegate == null)) {
                this.onGetXapsCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetXapsCompleted);
            }
            base.InvokeAsync(this.onBeginGetXapsDelegate, null, this.onEndGetXapsDelegate, this.onGetXapsCompletedDelegate, userState);
        }
        
        private System.IAsyncResult OnBeginOpen(object[] inValues, System.AsyncCallback callback, object asyncState) {
            return ((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(callback, asyncState);
        }
        
        private object[] OnEndOpen(System.IAsyncResult result) {
            ((System.ServiceModel.ICommunicationObject)(this)).EndOpen(result);
            return null;
        }
        
        private void OnOpenCompleted(object state) {
            if ((this.OpenCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.OpenCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void OpenAsync() {
            this.OpenAsync(null);
        }
        
        public void OpenAsync(object userState) {
            if ((this.onBeginOpenDelegate == null)) {
                this.onBeginOpenDelegate = new BeginOperationDelegate(this.OnBeginOpen);
            }
            if ((this.onEndOpenDelegate == null)) {
                this.onEndOpenDelegate = new EndOperationDelegate(this.OnEndOpen);
            }
            if ((this.onOpenCompletedDelegate == null)) {
                this.onOpenCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnOpenCompleted);
            }
            base.InvokeAsync(this.onBeginOpenDelegate, null, this.onEndOpenDelegate, this.onOpenCompletedDelegate, userState);
        }
        
        private System.IAsyncResult OnBeginClose(object[] inValues, System.AsyncCallback callback, object asyncState) {
            return ((System.ServiceModel.ICommunicationObject)(this)).BeginClose(callback, asyncState);
        }
        
        private object[] OnEndClose(System.IAsyncResult result) {
            ((System.ServiceModel.ICommunicationObject)(this)).EndClose(result);
            return null;
        }
        
        private void OnCloseCompleted(object state) {
            if ((this.CloseCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.CloseCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void CloseAsync() {
            this.CloseAsync(null);
        }
        
        public void CloseAsync(object userState) {
            if ((this.onBeginCloseDelegate == null)) {
                this.onBeginCloseDelegate = new BeginOperationDelegate(this.OnBeginClose);
            }
            if ((this.onEndCloseDelegate == null)) {
                this.onEndCloseDelegate = new EndOperationDelegate(this.OnEndClose);
            }
            if ((this.onCloseCompletedDelegate == null)) {
                this.onCloseCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnCloseCompleted);
            }
            base.InvokeAsync(this.onBeginCloseDelegate, null, this.onEndCloseDelegate, this.onCloseCompletedDelegate, userState);
        }
        
        protected override SkinableVideoPlayer.wsSkinableVideoPlayer.WebServiceSoap CreateChannel() {
            return new WebServiceSoapClientChannel(this);
        }
        
        private class WebServiceSoapClientChannel : ChannelBase<SkinableVideoPlayer.wsSkinableVideoPlayer.WebServiceSoap>, SkinableVideoPlayer.wsSkinableVideoPlayer.WebServiceSoap {
            
            public WebServiceSoapClientChannel(System.ServiceModel.ClientBase<SkinableVideoPlayer.wsSkinableVideoPlayer.WebServiceSoap> client) : 
                    base(client) {
            }
            
            public System.IAsyncResult BeginGetVideos(SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosRequest request, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = request;
                System.IAsyncResult _result = base.BeginInvoke("GetVideos", _args, callback, asyncState);
                return _result;
            }
            
            public SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosResponse EndGetVideos(System.IAsyncResult result) {
                object[] _args = new object[0];
                SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosResponse _result = ((SkinableVideoPlayer.wsSkinableVideoPlayer.GetVideosResponse)(base.EndInvoke("GetVideos", _args, result)));
                return _result;
            }
            
            public System.IAsyncResult BeginGetXaps(SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsRequest request, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = request;
                System.IAsyncResult _result = base.BeginInvoke("GetXaps", _args, callback, asyncState);
                return _result;
            }
            
            public SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsResponse EndGetXaps(System.IAsyncResult result) {
                object[] _args = new object[0];
                SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsResponse _result = ((SkinableVideoPlayer.wsSkinableVideoPlayer.GetXapsResponse)(base.EndInvoke("GetXaps", _args, result)));
                return _result;
            }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
Software Developer (Senior) http://ADefWebserver.com
United States United States
Michael Washington is a Microsoft MVP. He is a ASP.NET and
C# programmer.
He is the founder of
AiHelpWebsite.com,
LightSwitchHelpWebsite.com, and
HoloLensHelpWebsite.com.

He has a son, Zachary and resides in Los Angeles with his wife Valerie.

He is the Author of:

Written By
Software Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions