Click here to Skip to main content
15,895,142 members
Articles / Web Development / ASP.NET

Legion: Build your own virtual super computer with Silverlight

Rate me:
Please Sign up or sign in to vote.
4.87/5 (139 votes)
27 Oct 2008LGPL321 min read 423K   1.1K   335  
Legion is a grid computing framework that uses the Silverlight CLR to execute user definable tasks. It provides grid-wide thread-safe operations for web clients. Client performance metrics, such as bandwidth and processor speed, may be used to tailor jobs. Also includes a WPF Manager application.
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.1378
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Orpius.GridComputing.Management.GridServiceReference {
    using System.Runtime.Serialization;
    using System;
    
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Client", Namespace="http://schemas.datacontract.org/2004/07/Orpius.GridComputing")]
    [System.SerializableAttribute()]
    public partial class Client : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
        
        [System.NonSerializedAttribute()]
        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string IPAddressField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private System.Guid IdField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string MachineNameField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string UrlField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string UserNameField;
        
        [global::System.ComponentModel.BrowsableAttribute(false)]
        public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
            get {
                return this.extensionDataField;
            }
            set {
                this.extensionDataField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string IPAddress {
            get {
                return this.IPAddressField;
            }
            set {
                if ((object.ReferenceEquals(this.IPAddressField, value) != true)) {
                    this.IPAddressField = value;
                    this.RaisePropertyChanged("IPAddress");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Guid Id {
            get {
                return this.IdField;
            }
            set {
                if ((this.IdField.Equals(value) != true)) {
                    this.IdField = value;
                    this.RaisePropertyChanged("Id");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string MachineName {
            get {
                return this.MachineNameField;
            }
            set {
                if ((object.ReferenceEquals(this.MachineNameField, value) != true)) {
                    this.MachineNameField = value;
                    this.RaisePropertyChanged("MachineName");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Url {
            get {
                return this.UrlField;
            }
            set {
                if ((object.ReferenceEquals(this.UrlField, value) != true)) {
                    this.UrlField = value;
                    this.RaisePropertyChanged("Url");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string UserName {
            get {
                return this.UserNameField;
            }
            set {
                if ((object.ReferenceEquals(this.UserNameField, value) != true)) {
                    this.UserNameField = value;
                    this.RaisePropertyChanged("UserName");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="GridSummary", Namespace="http://schemas.datacontract.org/2004/07/Orpius.GridComputing")]
    [System.SerializableAttribute()]
    public partial class GridSummary : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
        
        [System.NonSerializedAttribute()]
        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private Orpius.GridComputing.Management.GridServiceReference.TaskSummary[] TaskSummariesField;
        
        [global::System.ComponentModel.BrowsableAttribute(false)]
        public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
            get {
                return this.extensionDataField;
            }
            set {
                this.extensionDataField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Orpius.GridComputing.Management.GridServiceReference.TaskSummary[] TaskSummaries {
            get {
                return this.TaskSummariesField;
            }
            set {
                if ((object.ReferenceEquals(this.TaskSummariesField, value) != true)) {
                    this.TaskSummariesField = value;
                    this.RaisePropertyChanged("TaskSummaries");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="TaskSummary", Namespace="http://schemas.datacontract.org/2004/07/Orpius.GridComputing")]
    [System.SerializableAttribute()]
    public partial class TaskSummary : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
        
        [System.NonSerializedAttribute()]
        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private int AgentCountField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private double BandwidthKBpsField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private long MFlopsField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string NameField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private Orpius.GridComputing.Management.GridServiceReference.TaskProgress ProgressField;
        
        [global::System.ComponentModel.BrowsableAttribute(false)]
        public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
            get {
                return this.extensionDataField;
            }
            set {
                this.extensionDataField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public int AgentCount {
            get {
                return this.AgentCountField;
            }
            set {
                if ((this.AgentCountField.Equals(value) != true)) {
                    this.AgentCountField = value;
                    this.RaisePropertyChanged("AgentCount");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public double BandwidthKBps {
            get {
                return this.BandwidthKBpsField;
            }
            set {
                if ((this.BandwidthKBpsField.Equals(value) != true)) {
                    this.BandwidthKBpsField = value;
                    this.RaisePropertyChanged("BandwidthKBps");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public long MFlops {
            get {
                return this.MFlopsField;
            }
            set {
                if ((this.MFlopsField.Equals(value) != true)) {
                    this.MFlopsField = value;
                    this.RaisePropertyChanged("MFlops");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Name {
            get {
                return this.NameField;
            }
            set {
                if ((object.ReferenceEquals(this.NameField, value) != true)) {
                    this.NameField = value;
                    this.RaisePropertyChanged("Name");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Orpius.GridComputing.Management.GridServiceReference.TaskProgress Progress {
            get {
                return this.ProgressField;
            }
            set {
                if ((object.ReferenceEquals(this.ProgressField, value) != true)) {
                    this.ProgressField = value;
                    this.RaisePropertyChanged("Progress");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="TaskProgress", Namespace="http://schemas.datacontract.org/2004/07/Orpius.GridComputing")]
    [System.SerializableAttribute()]
    public partial class TaskProgress : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
        
        [System.NonSerializedAttribute()]
        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private long StepsCompletedField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private long StepsGoalField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string TaskNameField;
        
        [global::System.ComponentModel.BrowsableAttribute(false)]
        public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
            get {
                return this.extensionDataField;
            }
            set {
                this.extensionDataField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public long StepsCompleted {
            get {
                return this.StepsCompletedField;
            }
            set {
                if ((this.StepsCompletedField.Equals(value) != true)) {
                    this.StepsCompletedField = value;
                    this.RaisePropertyChanged("StepsCompleted");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public long StepsGoal {
            get {
                return this.StepsGoalField;
            }
            set {
                if ((this.StepsGoalField.Equals(value) != true)) {
                    this.StepsGoalField = value;
                    this.RaisePropertyChanged("StepsGoal");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string TaskName {
            get {
                return this.TaskNameField;
            }
            set {
                if ((object.ReferenceEquals(this.TaskNameField, value) != true)) {
                    this.TaskNameField = value;
                    this.RaisePropertyChanged("TaskName");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="GridServiceReference.IGridManagementService")]
    public interface IGridManagementService {
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IGridManagementService/GetGridSummary", ReplyAction="http://tempuri.org/IGridManagementService/GetGridSummaryResponse")]
        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Orpius.GridComputing.Management.GridServiceReference.Client))]
        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Orpius.GridComputing.Management.GridServiceReference.GridSummary))]
        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Orpius.GridComputing.Management.GridServiceReference.TaskSummary[]))]
        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Orpius.GridComputing.Management.GridServiceReference.TaskSummary))]
        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Orpius.GridComputing.Management.GridServiceReference.TaskProgress))]
        Orpius.GridComputing.Management.GridServiceReference.GridSummary GetGridSummary(object client);
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public interface IGridManagementServiceChannel : Orpius.GridComputing.Management.GridServiceReference.IGridManagementService, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public partial class GridManagementServiceClient : System.ServiceModel.ClientBase<Orpius.GridComputing.Management.GridServiceReference.IGridManagementService>, Orpius.GridComputing.Management.GridServiceReference.IGridManagementService {
        
        public GridManagementServiceClient() {
        }
        
        public GridManagementServiceClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public GridManagementServiceClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public GridManagementServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public GridManagementServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress) {
        }
        
        public Orpius.GridComputing.Management.GridServiceReference.GridSummary GetGridSummary(object client) {
            return base.Channel.GetGridSummary(client);
        }
    }
}

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 GNU Lesser General Public License (LGPLv3)


Written By
Engineer
Switzerland Switzerland
Daniel is a former senior engineer in Technology and Research at the Office of the CTO at Microsoft, working on next generation systems.

Previously Daniel was a nine-time Microsoft MVP and co-founder of Outcoder, a Swiss software and consulting company.

Daniel is the author of Windows Phone 8 Unleashed and Windows Phone 7.5 Unleashed, both published by SAMS.

Daniel is the developer behind several acclaimed mobile apps including Surfy Browser for Android and Windows Phone. Daniel is the creator of a number of popular open-source projects, most notably Codon.

Would you like Daniel to bring value to your organisation? Please contact

Blog | Twitter


Xamarin Experts
Windows 10 Experts

Comments and Discussions