Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Silverlight Advanced View Model Style Video Player

, 16 May 2010
A full featured Silverlight View Model Style Video Player
MVVMVideoPlayer_Complete.zip
MVVMVideoPlayer_Test
MVVMVideoPlayer_TestSite
App_Code
ClientBin
MVVMVideoPlayer_Test.xap
favicon.ico
Video
desktop.ini
niceday.wmv
Thumbs.db
Webservice
Bin
Debug
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.Windows.Controls.resources.dll
el
System.Windows.Controls.resources.dll
es
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.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.Windows.Controls.resources.dll
ja
System.Windows.Controls.resources.dll
ko
System.Windows.Controls.resources.dll
lt
System.Windows.Controls.resources.dll
lv
System.Windows.Controls.resources.dll
Microsoft.Expression.Interactions.dll
ms
System.Windows.Controls.resources.dll
MVVMVideoPlayer_Test.dll
MVVMVideoPlayer_Test.pdb
MVVMVideoPlayer_Test.xap
nl
System.Windows.Controls.resources.dll
no
System.Windows.Controls.resources.dll
pl
System.Windows.Controls.resources.dll
pt
pt-BR
System.Windows.Controls.resources.dll
System.Windows.Controls.resources.dll
ro
System.Windows.Controls.resources.dll
ru
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.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.pdb
System.Windows.Interactivity.dll
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.Windows.Controls.resources.dll
zh-Hant
System.Windows.Controls.resources.dll
Release
classes
Model
MVVMVideoPlayer_Test.csproj.user
obj
Debug
DesignTimeResolveAssemblyReferences.cache
DesignTimeResolveAssemblyReferencesInput.cache
MVVMVideoPlayer_Test.dll
MVVMVideoPlayer_Test.g.resources
MVVMVideoPlayer_Test.pdb
ResolveAssemblyReference.cache
TempPE
Service References.wsVideos.Reference.cs.dll
Properties
Service References
wsVideos
configuration.svcinfo
configuration91.svcinfo
MVVMVideoPlayer_Test.wsVideos.GetVideosResponse.datasource
Reference.svcmap
WebService.disco
WebService.wsdl
ServiceReferences.ClientConfig
ViewModel
MVVMVideoPlayer_CompleteFwdRwd.zip
MVVMVideoPlayer_Test.xap
favicon.ico
desktop.ini
niceday.wmv
Thumbs.db
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.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.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
Microsoft.Expression.Interactions.dll
System.Windows.Controls.resources.dll
MVVMVideoPlayer_Test.dll
MVVMVideoPlayer_Test.pdb
MVVMVideoPlayer_Test.xap
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.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.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.pdb
System.Windows.Interactivity.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
MVVMVideoPlayer_Test.csproj.user
DesignTimeResolveAssemblyReferences.cache
DesignTimeResolveAssemblyReferencesInput.cache
MVVMVideoPlayer_Test.dll
MVVMVideoPlayer_Test.g.resources
MVVMVideoPlayer_Test.pdb
ResolveAssemblyReference.cache
Service References.wsVideos.Reference.cs.dll
configuration.svcinfo
configuration91.svcinfo
MVVMVideoPlayer_Test.wsVideos.GetVideosResponse.datasource
Reference.svcmap
WebService.disco
WebService.wsdl
ServiceReferences.ClientConfig
MVVMVideoPlayer_Complete_FwdRwd.zip
MVVMVideoPlayer_Test.xap
favicon.ico
desktop.ini
niceday.wmv
Thumbs.db
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.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.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
Microsoft.Expression.Interactions.dll
System.Windows.Controls.resources.dll
MVVMVideoPlayer_Test.dll
MVVMVideoPlayer_Test.pdb
MVVMVideoPlayer_Test.xap
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.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.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.pdb
System.Windows.Interactivity.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
MVVMVideoPlayer_Test.csproj.user
DesignTimeResolveAssemblyReferences.cache
DesignTimeResolveAssemblyReferencesInput.cache
MVVMVideoPlayer_Test.dll
MVVMVideoPlayer_Test.g.resources
MVVMVideoPlayer_Test.pdb
ResolveAssemblyReference.cache
Service References.wsVideos.Reference.cs.dll
configuration.svcinfo
configuration91.svcinfo
MVVMVideoPlayer_Test.wsVideos.GetVideosResponse.datasource
Reference.svcmap
WebService.disco
WebService.wsdl
ServiceReferences.ClientConfig
MVVMVideoPlayer_Starter.zip
MVVMVideoPlayer_Test.xap
favicon.ico
desktop.ini
Thumbs.db
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.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.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
Microsoft.Expression.Interactions.dll
System.Windows.Controls.resources.dll
MVVMVideoPlayer_Test.dll
MVVMVideoPlayer_Test.pdb
MVVMVideoPlayer_Test.xap
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.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.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.pdb
System.Windows.Interactivity.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
MVVMVideoPlayer_Test.csproj.user
DesignTimeResolveAssemblyReferences.cache
DesignTimeResolveAssemblyReferencesInput.cache
MVVMVideoPlayer_Test.dll
MVVMVideoPlayer_Test.g.resources
MVVMVideoPlayer_Test.pdb
ResolveAssemblyReference.cache
Service References.wsVideos.Reference.cs.dll
configuration.svcinfo
configuration91.svcinfo
MVVMVideoPlayer_Test.wsVideos.GetVideosResponse.datasource
Reference.svcmap
WebService.disco
WebService.wsdl
ServiceReferences.ClientConfig
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30128.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.50303.0
// 
namespace MVVMVideoPlayer_Test.wsVideos {
    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.Generic.List<string> {
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(Namespace="http://OpenLightGroup.net/", ConfigurationName="wsVideos.WebServiceSoap")]
    public interface WebServiceSoap {
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://OpenLightGroup.net/GetVideos", ReplyAction="*")]
        System.IAsyncResult BeginGetVideos(MVVMVideoPlayer_Test.wsVideos.GetVideosRequest request, System.AsyncCallback callback, object asyncState);
        
        MVVMVideoPlayer_Test.wsVideos.GetVideosResponse EndGetVideos(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 MVVMVideoPlayer_Test.wsVideos.GetVideosRequestBody Body;
        
        public GetVideosRequest() {
        }
        
        public GetVideosRequest(MVVMVideoPlayer_Test.wsVideos.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 MVVMVideoPlayer_Test.wsVideos.GetVideosResponseBody Body;
        
        public GetVideosResponse() {
        }
        
        public GetVideosResponse(MVVMVideoPlayer_Test.wsVideos.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 MVVMVideoPlayer_Test.wsVideos.ArrayOfString GetVideosResult;
        
        public GetVideosResponseBody() {
        }
        
        public GetVideosResponseBody(MVVMVideoPlayer_Test.wsVideos.ArrayOfString GetVideosResult) {
            this.GetVideosResult = GetVideosResult;
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface WebServiceSoapChannel : MVVMVideoPlayer_Test.wsVideos.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 MVVMVideoPlayer_Test.wsVideos.ArrayOfString Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((MVVMVideoPlayer_Test.wsVideos.ArrayOfString)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class WebServiceSoapClient : System.ServiceModel.ClientBase<MVVMVideoPlayer_Test.wsVideos.WebServiceSoap>, MVVMVideoPlayer_Test.wsVideos.WebServiceSoap {
        
        private BeginOperationDelegate onBeginGetVideosDelegate;
        
        private EndOperationDelegate onEndGetVideosDelegate;
        
        private System.Threading.SendOrPostCallback onGetVideosCompletedDelegate;
        
        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<System.ComponentModel.AsyncCompletedEventArgs> OpenCompleted;
        
        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> CloseCompleted;
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult MVVMVideoPlayer_Test.wsVideos.WebServiceSoap.BeginGetVideos(MVVMVideoPlayer_Test.wsVideos.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) {
            MVVMVideoPlayer_Test.wsVideos.GetVideosRequest inValue = new MVVMVideoPlayer_Test.wsVideos.GetVideosRequest();
            inValue.Body = new MVVMVideoPlayer_Test.wsVideos.GetVideosRequestBody();
            return ((MVVMVideoPlayer_Test.wsVideos.WebServiceSoap)(this)).BeginGetVideos(inValue, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        MVVMVideoPlayer_Test.wsVideos.GetVideosResponse MVVMVideoPlayer_Test.wsVideos.WebServiceSoap.EndGetVideos(System.IAsyncResult result) {
            return base.Channel.EndGetVideos(result);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        private MVVMVideoPlayer_Test.wsVideos.ArrayOfString EndGetVideos(System.IAsyncResult result) {
            MVVMVideoPlayer_Test.wsVideos.GetVideosResponse retVal = ((MVVMVideoPlayer_Test.wsVideos.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) {
            MVVMVideoPlayer_Test.wsVideos.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);
        }
        
        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 MVVMVideoPlayer_Test.wsVideos.WebServiceSoap CreateChannel() {
            return new WebServiceSoapClientChannel(this);
        }
        
        private class WebServiceSoapClientChannel : ChannelBase<MVVMVideoPlayer_Test.wsVideos.WebServiceSoap>, MVVMVideoPlayer_Test.wsVideos.WebServiceSoap {
            
            public WebServiceSoapClientChannel(System.ServiceModel.ClientBase<MVVMVideoPlayer_Test.wsVideos.WebServiceSoap> client) : 
                    base(client) {
            }
            
            public System.IAsyncResult BeginGetVideos(MVVMVideoPlayer_Test.wsVideos.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 MVVMVideoPlayer_Test.wsVideos.GetVideosResponse EndGetVideos(System.IAsyncResult result) {
                object[] _args = new object[0];
                MVVMVideoPlayer_Test.wsVideos.GetVideosResponse _result = ((MVVMVideoPlayer_Test.wsVideos.GetVideosResponse)(base.EndInvoke("GetVideos", _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)

About the Author

defwebserver
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 http://LightSwitchHelpWebsite.com
 
He has a son, Zachary and resides in Los Angeles with his wife Valerie.
Follow on   Twitter

| Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 16 May 2010
Article Copyright 2010 by defwebserver
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid