/glados_proto/glados_proto/Generated_Code/glados.Web.g.cs.orig
Unknown | 5494 lines | 4913 code | 581 blank | 0 comment | 0 complexity | d0a425f5f416f1df4fc33a82a4d51803 MD5 | raw file
- //------------------------------------------------------------------------------
- // <auto-generated>
- // This code was generated by a tool.
- <<<<<<< local
- // Runtime Version:4.0.30319.237
- =======
- // Runtime Version:4.0.30319.1
- >>>>>>> other
- //
- // Changes to this file may cause incorrect behavior and will be lost if
- // the code is regenerated.
- // </auto-generated>
- //------------------------------------------------------------------------------
-
- namespace glados
- {
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using System.Linq;
- using System.ServiceModel.DomainServices;
- using System.ServiceModel.DomainServices.Client;
- using System.ServiceModel.DomainServices.Client.ApplicationServices;
- using glados.Web;
-
-
- /// <summary>
- /// Context for the RIA application.
- /// </summary>
- /// <remarks>
- /// This context extends the base to make application services and types available
- /// for consumption from code and xaml.
- /// </remarks>
- public sealed partial class WebContext : WebContextBase
- {
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the WebContext class.
- /// </summary>
- public WebContext()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets the context that is registered as a lifetime object with the current application.
- /// </summary>
- /// <exception cref="InvalidOperationException"> is thrown if there is no current application,
- /// no contexts have been added, or more than one context has been added.
- /// </exception>
- /// <seealso cref="System.Windows.Application.ApplicationLifetimeObjects"/>
- public new static WebContext Current
- {
- get
- {
- return ((WebContext)(WebContextBase.Current));
- }
- }
-
- /// <summary>
- /// Gets a user representing the authenticated identity.
- /// </summary>
- public new AuthUser User
- {
- get
- {
- return ((AuthUser)(base.User));
- }
- }
- }
- }
- namespace Glados.TestingModule.Interfaces
- {
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using System.Linq;
- using System.ServiceModel.DomainServices;
- using System.ServiceModel.DomainServices.Client;
- using System.ServiceModel.DomainServices.Client.ApplicationServices;
-
-
- public enum ServerStatus
- {
-
- Idle = 0,
-
- Busy = 1,
-
- InternalError = 2,
-
- Unavailable = 3,
-
- Down = 4,
- }
- }
- namespace glados.Web
- {
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using System.Linq;
- using System.Runtime.Serialization;
- using System.ServiceModel;
- using System.ServiceModel.DomainServices;
- using System.ServiceModel.DomainServices.Client;
- using System.ServiceModel.DomainServices.Client.ApplicationServices;
- using System.ServiceModel.Web;
- using System.Xml.Serialization;
-
-
- /// <summary>
- /// The 'Assignment' entity class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
- public sealed partial class Assignment : Entity
- {
-
- private int _id;
-
- private EntityRef<Participation> _participation;
-
- private int _participationId;
-
- private EntityRef<Problem> _problem;
-
- private int _problemId;
-
- private byte[] _state;
-
- private EntityCollection<Submission> _submission;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnIdChanging(int value);
- partial void OnIdChanged();
- partial void OnParticipationIdChanging(int value);
- partial void OnParticipationIdChanged();
- partial void OnProblemIdChanging(int value);
- partial void OnProblemIdChanged();
- partial void OnStateChanging(byte[] value);
- partial void OnStateChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="Assignment"/> class.
- /// </summary>
- public Assignment()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the 'Id' value.
- /// </summary>
- [DataMember()]
- [Editable(false, AllowInitialValue=true)]
- [Key()]
- [RoundtripOriginal()]
- public int Id
- {
- get
- {
- return this._id;
- }
- set
- {
- if ((this._id != value))
- {
- this.OnIdChanging(value);
- this.ValidateProperty("Id", value);
- this._id = value;
- this.RaisePropertyChanged("Id");
- this.OnIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the associated <see cref="Participation"/> entity.
- /// </summary>
- [Association("Participation_Assignment", "ParticipationId", "Id", IsForeignKey=true)]
- [XmlIgnore()]
- public Participation Participation
- {
- get
- {
- if ((this._participation == null))
- {
- this._participation = new EntityRef<Participation>(this, "Participation", this.FilterParticipation);
- }
- return this._participation.Entity;
- }
- set
- {
- Participation previous = this.Participation;
- if ((previous != value))
- {
- this.ValidateProperty("Participation", value);
- if ((previous != null))
- {
- this._participation.Entity = null;
- previous.Assignment.Remove(this);
- }
- if ((value != null))
- {
- this.ParticipationId = value.Id;
- }
- else
- {
- this.ParticipationId = default(int);
- }
- this._participation.Entity = value;
- if ((value != null))
- {
- value.Assignment.Add(this);
- }
- this.RaisePropertyChanged("Participation");
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'ParticipationId' value.
- /// </summary>
- [DataMember()]
- [RoundtripOriginal()]
- public int ParticipationId
- {
- get
- {
- return this._participationId;
- }
- set
- {
- if ((this._participationId != value))
- {
- this.OnParticipationIdChanging(value);
- this.RaiseDataMemberChanging("ParticipationId");
- this.ValidateProperty("ParticipationId", value);
- this._participationId = value;
- this.RaiseDataMemberChanged("ParticipationId");
- this.OnParticipationIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the associated <see cref="Problem"/> entity.
- /// </summary>
- [Association("Problem_Assignment", "ProblemId", "Id", IsForeignKey=true)]
- [XmlIgnore()]
- public Problem Problem
- {
- get
- {
- if ((this._problem == null))
- {
- this._problem = new EntityRef<Problem>(this, "Problem", this.FilterProblem);
- }
- return this._problem.Entity;
- }
- set
- {
- Problem previous = this.Problem;
- if ((previous != value))
- {
- this.ValidateProperty("Problem", value);
- if ((previous != null))
- {
- this._problem.Entity = null;
- previous.Assignment.Remove(this);
- }
- if ((value != null))
- {
- this.ProblemId = value.Id;
- }
- else
- {
- this.ProblemId = default(int);
- }
- this._problem.Entity = value;
- if ((value != null))
- {
- value.Assignment.Add(this);
- }
- this.RaisePropertyChanged("Problem");
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'ProblemId' value.
- /// </summary>
- [DataMember()]
- [RoundtripOriginal()]
- public int ProblemId
- {
- get
- {
- return this._problemId;
- }
- set
- {
- if ((this._problemId != value))
- {
- this.OnProblemIdChanging(value);
- this.RaiseDataMemberChanging("ProblemId");
- this.ValidateProperty("ProblemId", value);
- this._problemId = value;
- this.RaiseDataMemberChanged("ProblemId");
- this.OnProblemIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'State' value.
- /// </summary>
- [DataMember()]
- public byte[] State
- {
- get
- {
- return this._state;
- }
- set
- {
- if ((this._state != value))
- {
- this.OnStateChanging(value);
- this.RaiseDataMemberChanging("State");
- this.ValidateProperty("State", value);
- this._state = value;
- this.RaiseDataMemberChanged("State");
- this.OnStateChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets the collection of associated <see cref="Submission"/> entity instances.
- /// </summary>
- [Association("Assignment_Submission", "Id", "AssignmentId")]
- [XmlIgnore()]
- public EntityCollection<Submission> Submission
- {
- get
- {
- if ((this._submission == null))
- {
- this._submission = new EntityCollection<Submission>(this, "Submission", this.FilterSubmission, this.AttachSubmission, this.DetachSubmission);
- }
- return this._submission;
- }
- }
-
- private bool FilterParticipation(Participation entity)
- {
- return (entity.Id == this.ParticipationId);
- }
-
- private bool FilterProblem(Problem entity)
- {
- return (entity.Id == this.ProblemId);
- }
-
- private void AttachSubmission(Submission entity)
- {
- entity.Assignment = this;
- }
-
- private void DetachSubmission(Submission entity)
- {
- entity.Assignment = null;
- }
-
- private bool FilterSubmission(Submission entity)
- {
- return (entity.AssignmentId == this.Id);
- }
-
- /// <summary>
- /// Computes a value from the key fields that uniquely identifies this entity instance.
- /// </summary>
- /// <returns>An object instance that uniquely identifies this entity instance.</returns>
- public override object GetIdentity()
- {
- return this._id;
- }
- }
-
- /// <summary>
- /// The DomainContext corresponding to the 'AuthenticationDomainService' DomainService.
- /// </summary>
- public sealed partial class AuthenticationDomainContext : global::System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationDomainContextBase
- {
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="AuthenticationDomainContext"/> class.
- /// </summary>
- public AuthenticationDomainContext() :
- this(new WebDomainClient<IAuthenticationDomainServiceContract>(new Uri("glados-Web-AuthenticationDomainService.svc", UriKind.Relative)))
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="AuthenticationDomainContext"/> class with the specified service URI.
- /// </summary>
- /// <param name="serviceUri">The AuthenticationDomainService service URI.</param>
- public AuthenticationDomainContext(Uri serviceUri) :
- this(new WebDomainClient<IAuthenticationDomainServiceContract>(serviceUri))
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="AuthenticationDomainContext"/> class with the specified <paramref name="domainClient"/>.
- /// </summary>
- /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
- public AuthenticationDomainContext(DomainClient domainClient) :
- base(domainClient)
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets the set of <see cref="AuthUser"/> entity instances that have been loaded into this <see cref="AuthenticationDomainContext"/> instance.
- /// </summary>
- public EntitySet<AuthUser> AuthUsers
- {
- get
- {
- return base.EntityContainer.GetEntitySet<AuthUser>();
- }
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="AuthUser"/> entity instances using the 'GetUser' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="AuthUser"/> entity instances.</returns>
- public EntityQuery<AuthUser> GetUserQuery()
- {
- this.ValidateMethod("GetUserQuery", null);
- return base.CreateQuery<AuthUser>("GetUser", null, false, false);
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="AuthUser"/> entity instances using the 'Login' query.
- /// </summary>
- /// <param name="userName">The value for the 'userName' parameter of the query.</param>
- /// <param name="password">The value for the 'password' parameter of the query.</param>
- /// <param name="isPersistent">The value for the 'isPersistent' parameter of the query.</param>
- /// <param name="customData">The value for the 'customData' parameter of the query.</param>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="AuthUser"/> entity instances.</returns>
- public EntityQuery<AuthUser> LoginQuery(string userName, string password, bool isPersistent, string customData)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("userName", userName);
- parameters.Add("password", password);
- parameters.Add("isPersistent", isPersistent);
- parameters.Add("customData", customData);
- this.ValidateMethod("LoginQuery", parameters);
- return base.CreateQuery<AuthUser>("Login", parameters, true, false);
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="AuthUser"/> entity instances using the 'Logout' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="AuthUser"/> entity instances.</returns>
- public EntityQuery<AuthUser> LogoutQuery()
- {
- this.ValidateMethod("LogoutQuery", null);
- return base.CreateQuery<AuthUser>("Logout", null, true, false);
- }
-
- /// <summary>
- /// Creates a new EntityContainer for this DomainContext's EntitySets.
- /// </summary>
- /// <returns>A new container instance.</returns>
- protected override EntityContainer CreateEntityContainer()
- {
- return new AuthenticationDomainContextEntityContainer();
- }
-
- /// <summary>
- /// Service contract for the 'AuthenticationDomainService' DomainService.
- /// </summary>
- [ServiceContract()]
- public interface IAuthenticationDomainServiceContract
- {
-
- /// <summary>
- /// Asynchronously invokes the 'GetUser' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/AuthenticationDomainService/GetUserDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/AuthenticationDomainService/GetUser", ReplyAction="http://tempuri.org/AuthenticationDomainService/GetUserResponse")]
- [WebGet()]
- IAsyncResult BeginGetUser(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetUser'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetUser'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetUser' operation.</returns>
- QueryResult<AuthUser> EndGetUser(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'Login' operation.
- /// </summary>
- /// <param name="userName">The value for the 'userName' parameter of this action.</param>
- /// <param name="password">The value for the 'password' parameter of this action.</param>
- /// <param name="isPersistent">The value for the 'isPersistent' parameter of this action.</param>
- /// <param name="customData">The value for the 'customData' parameter of this action.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/AuthenticationDomainService/LoginDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/AuthenticationDomainService/Login", ReplyAction="http://tempuri.org/AuthenticationDomainService/LoginResponse")]
- IAsyncResult BeginLogin(string userName, string password, bool isPersistent, string customData, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginLogin'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginLogin'.</param>
- /// <returns>The 'QueryResult' returned from the 'Login' operation.</returns>
- QueryResult<AuthUser> EndLogin(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'Logout' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/AuthenticationDomainService/LogoutDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/AuthenticationDomainService/Logout", ReplyAction="http://tempuri.org/AuthenticationDomainService/LogoutResponse")]
- IAsyncResult BeginLogout(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginLogout'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginLogout'.</param>
- /// <returns>The 'QueryResult' returned from the 'Logout' operation.</returns>
- QueryResult<AuthUser> EndLogout(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'SubmitChanges' operation.
- /// </summary>
- /// <param name="changeSet">The change-set to submit.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/AuthenticationDomainService/SubmitChangesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/AuthenticationDomainService/SubmitChanges", ReplyAction="http://tempuri.org/AuthenticationDomainService/SubmitChangesResponse")]
- IAsyncResult BeginSubmitChanges(IEnumerable<ChangeSetEntry> changeSet, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginSubmitChanges'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginSubmitChanges'.</param>
- /// <returns>The collection of change-set entry elements returned from 'SubmitChanges'.</returns>
- IEnumerable<ChangeSetEntry> EndSubmitChanges(IAsyncResult result);
- }
-
- internal sealed class AuthenticationDomainContextEntityContainer : EntityContainer
- {
-
- public AuthenticationDomainContextEntityContainer()
- {
- this.CreateEntitySet<AuthUser>(EntitySetOperations.Edit);
- }
- }
- }
-
- /// <summary>
- /// The 'AuthUser' entity class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
- public sealed partial class AuthUser : Entity, global::System.Security.Principal.IIdentity, global::System.Security.Principal.IPrincipal
- {
-
- private string _name = string.Empty;
-
- private IEnumerable<string> _roles;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
- partial void OnRolesChanging(IEnumerable<string> value);
- partial void OnRolesChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="AuthUser"/> class.
- /// </summary>
- public AuthUser()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the 'Name' value.
- /// </summary>
- [DataMember()]
- [Editable(false, AllowInitialValue=true)]
- [Key()]
- [RoundtripOriginal()]
- public string Name
- {
- get
- {
- return this._name;
- }
- set
- {
- if ((this._name != value))
- {
- this.OnNameChanging(value);
- this.ValidateProperty("Name", value);
- this._name = value;
- this.RaisePropertyChanged("Name");
- this.OnNameChanged();
- this.RaisePropertyChanged("IsAuthenticated");
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Roles' value.
- /// </summary>
- [DataMember()]
- [Editable(false)]
- public IEnumerable<string> Roles
- {
- get
- {
- return this._roles;
- }
- set
- {
- if ((this._roles != value))
- {
- this.OnRolesChanging(value);
- this.ValidateProperty("Roles", value);
- this._roles = value;
- this.RaisePropertyChanged("Roles");
- this.OnRolesChanged();
- }
- }
- }
-
- string global::System.Security.Principal.IIdentity.AuthenticationType
- {
- get
- {
- return string.Empty;
- }
- }
-
- /// <summary>
- /// Gets a value indicating whether the identity is authenticated.
- /// </summary>
- /// <remarks>
- /// This value is <c>true</c> if <see cref="Name"/> is not <c>null</c> or empty.
- /// </remarks>
- public bool IsAuthenticated
- {
- get
- {
- return (true != string.IsNullOrEmpty(this.Name));
- }
- }
-
- string global::System.Security.Principal.IIdentity.Name
- {
- get
- {
- return this.Name;
- }
- }
-
- global::System.Security.Principal.IIdentity global::System.Security.Principal.IPrincipal.Identity
- {
- get
- {
- return this;
- }
- }
-
- /// <summary>
- /// Computes a value from the key fields that uniquely identifies this entity instance.
- /// </summary>
- /// <returns>An object instance that uniquely identifies this entity instance.</returns>
- public override object GetIdentity()
- {
- return this._name;
- }
-
- /// <summary>
- /// Return whether the principal is in the role.
- /// </summary>
- /// <remarks>
- /// Returns whether the specified role is contained in the roles.
- /// This implementation is case sensitive.
- /// </remarks>
- /// <param name="role">The name of the role for which to check membership.</param>
- /// <returns>Whether the principal is in the role.</returns>
- public bool IsInRole(string role)
- {
- if ((this.Roles == null))
- {
- return false;
- }
- return global::System.Linq.Enumerable.Contains(this.Roles, role);
- }
- }
-
- /// <summary>
- /// The 'Course' entity class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
- public sealed partial class Course : Entity
- {
-
- private int _id;
-
- private string _name;
-
- private EntityCollection<Participation> _participation;
-
- private byte[] _state;
-
- private string _type;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnIdChanging(int value);
- partial void OnIdChanged();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
- partial void OnStateChanging(byte[] value);
- partial void OnStateChanged();
- partial void OnTypeChanging(string value);
- partial void OnTypeChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="Course"/> class.
- /// </summary>
- public Course()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the 'Id' value.
- /// </summary>
- [DataMember()]
- [Editable(false, AllowInitialValue=true)]
- [Key()]
- [RoundtripOriginal()]
- public int Id
- {
- get
- {
- return this._id;
- }
- set
- {
- if ((this._id != value))
- {
- this.OnIdChanging(value);
- this.ValidateProperty("Id", value);
- this._id = value;
- this.RaisePropertyChanged("Id");
- this.OnIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Name' value.
- /// </summary>
- [DataMember()]
- [Required()]
- public string Name
- {
- get
- {
- return this._name;
- }
- set
- {
- if ((this._name != value))
- {
- this.OnNameChanging(value);
- this.RaiseDataMemberChanging("Name");
- this.ValidateProperty("Name", value);
- this._name = value;
- this.RaiseDataMemberChanged("Name");
- this.OnNameChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets the collection of associated <see cref="Participation"/> entity instances.
- /// </summary>
- [Association("Course_Participation", "Id", "CourseId")]
- [XmlIgnore()]
- public EntityCollection<Participation> Participation
- {
- get
- {
- if ((this._participation == null))
- {
- this._participation = new EntityCollection<Participation>(this, "Participation", this.FilterParticipation, this.AttachParticipation, this.DetachParticipation);
- }
- return this._participation;
- }
- }
-
- /// <summary>
- /// Gets or sets the 'State' value.
- /// </summary>
- [DataMember()]
- public byte[] State
- {
- get
- {
- return this._state;
- }
- set
- {
- if ((this._state != value))
- {
- this.OnStateChanging(value);
- this.RaiseDataMemberChanging("State");
- this.ValidateProperty("State", value);
- this._state = value;
- this.RaiseDataMemberChanged("State");
- this.OnStateChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Type' value.
- /// </summary>
- [DataMember()]
- public string Type
- {
- get
- {
- return this._type;
- }
- set
- {
- if ((this._type != value))
- {
- this.OnTypeChanging(value);
- this.RaiseDataMemberChanging("Type");
- this.ValidateProperty("Type", value);
- this._type = value;
- this.RaiseDataMemberChanged("Type");
- this.OnTypeChanged();
- }
- }
- }
-
- private void AttachParticipation(Participation entity)
- {
- entity.Course = this;
- }
-
- private void DetachParticipation(Participation entity)
- {
- entity.Course = null;
- }
-
- private bool FilterParticipation(Participation entity)
- {
- return (entity.CourseId == this.Id);
- }
-
- /// <summary>
- /// Computes a value from the key fields that uniquely identifies this entity instance.
- /// </summary>
- /// <returns>An object instance that uniquely identifies this entity instance.</returns>
- public override object GetIdentity()
- {
- return this._id;
- }
- }
-
- /// <summary>
- /// The 'Group' entity class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
- public sealed partial class Group : Entity
- {
-
- private int _id;
-
- private EntityCollection<Membership> _membership;
-
- private string _name;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnIdChanging(int value);
- partial void OnIdChanged();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="Group"/> class.
- /// </summary>
- public Group()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the 'Id' value.
- /// </summary>
- [DataMember()]
- [Editable(false, AllowInitialValue=true)]
- [Key()]
- [RoundtripOriginal()]
- public int Id
- {
- get
- {
- return this._id;
- }
- set
- {
- if ((this._id != value))
- {
- this.OnIdChanging(value);
- this.ValidateProperty("Id", value);
- this._id = value;
- this.RaisePropertyChanged("Id");
- this.OnIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets the collection of associated <see cref="Membership"/> entity instances.
- /// </summary>
- [Association("Group_Membership", "Id", "GroupId")]
- [XmlIgnore()]
- public EntityCollection<Membership> Membership
- {
- get
- {
- if ((this._membership == null))
- {
- this._membership = new EntityCollection<Membership>(this, "Membership", this.FilterMembership, this.AttachMembership, this.DetachMembership);
- }
- return this._membership;
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Name' value.
- /// </summary>
- [DataMember()]
- [Required()]
- public string Name
- {
- get
- {
- return this._name;
- }
- set
- {
- if ((this._name != value))
- {
- this.OnNameChanging(value);
- this.RaiseDataMemberChanging("Name");
- this.ValidateProperty("Name", value);
- this._name = value;
- this.RaiseDataMemberChanged("Name");
- this.OnNameChanged();
- }
- }
- }
-
- private void AttachMembership(Membership entity)
- {
- entity.Group = this;
- }
-
- private void DetachMembership(Membership entity)
- {
- entity.Group = null;
- }
-
- private bool FilterMembership(Membership entity)
- {
- return (entity.GroupId == this.Id);
- }
-
- /// <summary>
- /// Computes a value from the key fields that uniquely identifies this entity instance.
- /// </summary>
- /// <returns>An object instance that uniquely identifies this entity instance.</returns>
- public override object GetIdentity()
- {
- return this._id;
- }
- }
-
- /// <summary>
- /// The 'Membership' entity class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
- public sealed partial class Membership : Entity
- {
-
- private EntityRef<Group> _group;
-
- private int _groupId;
-
- private int _id;
-
- private EntityRef<User> _user;
-
- private int _userId;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnGroupIdChanging(int value);
- partial void OnGroupIdChanged();
- partial void OnIdChanging(int value);
- partial void OnIdChanged();
- partial void OnUserIdChanging(int value);
- partial void OnUserIdChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="Membership"/> class.
- /// </summary>
- public Membership()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the associated <see cref="Group"/> entity.
- /// </summary>
- [Association("Group_Membership", "GroupId", "Id", IsForeignKey=true)]
- [XmlIgnore()]
- public Group Group
- {
- get
- {
- if ((this._group == null))
- {
- this._group = new EntityRef<Group>(this, "Group", this.FilterGroup);
- }
- return this._group.Entity;
- }
- set
- {
- Group previous = this.Group;
- if ((previous != value))
- {
- this.ValidateProperty("Group", value);
- if ((previous != null))
- {
- this._group.Entity = null;
- previous.Membership.Remove(this);
- }
- if ((value != null))
- {
- this.GroupId = value.Id;
- }
- else
- {
- this.GroupId = default(int);
- }
- this._group.Entity = value;
- if ((value != null))
- {
- value.Membership.Add(this);
- }
- this.RaisePropertyChanged("Group");
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'GroupId' value.
- /// </summary>
- [DataMember()]
- [RoundtripOriginal()]
- public int GroupId
- {
- get
- {
- return this._groupId;
- }
- set
- {
- if ((this._groupId != value))
- {
- this.OnGroupIdChanging(value);
- this.RaiseDataMemberChanging("GroupId");
- this.ValidateProperty("GroupId", value);
- this._groupId = value;
- this.RaiseDataMemberChanged("GroupId");
- this.OnGroupIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Id' value.
- /// </summary>
- [DataMember()]
- [Editable(false, AllowInitialValue=true)]
- [Key()]
- [RoundtripOriginal()]
- public int Id
- {
- get
- {
- return this._id;
- }
- set
- {
- if ((this._id != value))
- {
- this.OnIdChanging(value);
- this.ValidateProperty("Id", value);
- this._id = value;
- this.RaisePropertyChanged("Id");
- this.OnIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the associated <see cref="User"/> entity.
- /// </summary>
- [Association("User_Membership", "UserId", "Id", IsForeignKey=true)]
- [XmlIgnore()]
- public User User
- {
- get
- {
- if ((this._user == null))
- {
- this._user = new EntityRef<User>(this, "User", this.FilterUser);
- }
- return this._user.Entity;
- }
- set
- {
- User previous = this.User;
- if ((previous != value))
- {
- this.ValidateProperty("User", value);
- if ((previous != null))
- {
- this._user.Entity = null;
- previous.Membership.Remove(this);
- }
- if ((value != null))
- {
- this.UserId = value.Id;
- }
- else
- {
- this.UserId = default(int);
- }
- this._user.Entity = value;
- if ((value != null))
- {
- value.Membership.Add(this);
- }
- this.RaisePropertyChanged("User");
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'UserId' value.
- /// </summary>
- [DataMember()]
- [RoundtripOriginal()]
- public int UserId
- {
- get
- {
- return this._userId;
- }
- set
- {
- if ((this._userId != value))
- {
- this.OnUserIdChanging(value);
- this.RaiseDataMemberChanging("UserId");
- this.ValidateProperty("UserId", value);
- this._userId = value;
- this.RaiseDataMemberChanged("UserId");
- this.OnUserIdChanged();
- }
- }
- }
-
- private bool FilterGroup(Group entity)
- {
- return (entity.Id == this.GroupId);
- }
-
- private bool FilterUser(User entity)
- {
- return (entity.Id == this.UserId);
- }
-
- /// <summary>
- /// Computes a value from the key fields that uniquely identifies this entity instance.
- /// </summary>
- /// <returns>An object instance that uniquely identifies this entity instance.</returns>
- public override object GetIdentity()
- {
- return this._id;
- }
- }
-
- /// <summary>
- /// The 'Message' entity class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
- public sealed partial class Message : Entity
- {
-
- private int _id;
-
- private int _receiverId;
-
- private int _senderId;
-
- private DateTime _sentTime;
-
- private int _status;
-
- private string _subject;
-
- private string _text;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnIdChanging(int value);
- partial void OnIdChanged();
- partial void OnReceiverIdChanging(int value);
- partial void OnReceiverIdChanged();
- partial void OnSenderIdChanging(int value);
- partial void OnSenderIdChanged();
- partial void OnSentTimeChanging(DateTime value);
- partial void OnSentTimeChanged();
- partial void OnStatusChanging(int value);
- partial void OnStatusChanged();
- partial void OnSubjectChanging(string value);
- partial void OnSubjectChanged();
- partial void OnTextChanging(string value);
- partial void OnTextChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="Message"/> class.
- /// </summary>
- public Message()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the 'Id' value.
- /// </summary>
- // The following attributes were not generated:
- //
- // - The attribute 'System.ComponentModel.DataAnnotations.DatabaseGeneratedAttribute' is not visible in the client project 'glados.UI'. Are you missing an assembly reference?
- // [DatabaseGeneratedAttribute(Identity)]
- //
- [DataMember()]
- [Editable(false, AllowInitialValue=true)]
- [Key()]
- [RoundtripOriginal()]
- public int Id
- {
- get
- {
- return this._id;
- }
- set
- {
- if ((this._id != value))
- {
- this.OnIdChanging(value);
- this.ValidateProperty("Id", value);
- this._id = value;
- this.RaisePropertyChanged("Id");
- this.OnIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'ReceiverId' value.
- /// </summary>
- [DataMember()]
- [RoundtripOriginal()]
- public int ReceiverId
- {
- get
- {
- return this._receiverId;
- }
- set
- {
- if ((this._receiverId != value))
- {
- this.OnReceiverIdChanging(value);
- this.RaiseDataMemberChanging("ReceiverId");
- this.ValidateProperty("ReceiverId", value);
- this._receiverId = value;
- this.RaiseDataMemberChanged("ReceiverId");
- this.OnReceiverIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'SenderId' value.
- /// </summary>
- [DataMember()]
- [RoundtripOriginal()]
- public int SenderId
- {
- get
- {
- return this._senderId;
- }
- set
- {
- if ((this._senderId != value))
- {
- this.OnSenderIdChanging(value);
- this.RaiseDataMemberChanging("SenderId");
- this.ValidateProperty("SenderId", value);
- this._senderId = value;
- this.RaiseDataMemberChanged("SenderId");
- this.OnSenderIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'SentTime' value.
- /// </summary>
- [DataMember()]
- public DateTime SentTime
- {
- get
- {
- return this._sentTime;
- }
- set
- {
- if ((this._sentTime != value))
- {
- this.OnSentTimeChanging(value);
- this.RaiseDataMemberChanging("SentTime");
- this.ValidateProperty("SentTime", value);
- this._sentTime = value;
- this.RaiseDataMemberChanged("SentTime");
- this.OnSentTimeChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Status' value.
- /// </summary>
- [DataMember()]
- public int Status
- {
- get
- {
- return this._status;
- }
- set
- {
- if ((this._status != value))
- {
- this.OnStatusChanging(value);
- this.RaiseDataMemberChanging("Status");
- this.ValidateProperty("Status", value);
- this._status = value;
- this.RaiseDataMemberChanged("Status");
- this.OnStatusChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Subject' value.
- /// </summary>
- [DataMember()]
- [Required()]
- public string Subject
- {
- get
- {
- return this._subject;
- }
- set
- {
- if ((this._subject != value))
- {
- this.OnSubjectChanging(value);
- this.RaiseDataMemberChanging("Subject");
- this.ValidateProperty("Subject", value);
- this._subject = value;
- this.RaiseDataMemberChanged("Subject");
- this.OnSubjectChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Text' value.
- /// </summary>
- [DataMember()]
- [Required()]
- public string Text
- {
- get
- {
- return this._text;
- }
- set
- {
- if ((this._text != value))
- {
- this.OnTextChanging(value);
- this.RaiseDataMemberChanging("Text");
- this.ValidateProperty("Text", value);
- this._text = value;
- this.RaiseDataMemberChanged("Text");
- this.OnTextChanged();
- }
- }
- }
-
- /// <summary>
- /// Computes a value from the key fields that uniquely identifies this entity instance.
- /// </summary>
- /// <returns>An object instance that uniquely identifies this entity instance.</returns>
- public override object GetIdentity()
- {
- return this._id;
- }
- }
-
- /// <summary>
- /// The 'Participation' entity class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
- public sealed partial class Participation : Entity
- {
-
- private EntityCollection<Assignment> _assignment;
-
- private EntityRef<Course> _course;
-
- private int _courseId;
-
- private int _id;
-
- private byte[] _state;
-
- private EntityRef<User> _user;
-
- private int _userId;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnCourseIdChanging(int value);
- partial void OnCourseIdChanged();
- partial void OnIdChanging(int value);
- partial void OnIdChanged();
- partial void OnStateChanging(byte[] value);
- partial void OnStateChanged();
- partial void OnUserIdChanging(int value);
- partial void OnUserIdChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="Participation"/> class.
- /// </summary>
- public Participation()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets the collection of associated <see cref="Assignment"/> entity instances.
- /// </summary>
- [Association("Participation_Assignment", "Id", "ParticipationId")]
- [XmlIgnore()]
- public EntityCollection<Assignment> Assignment
- {
- get
- {
- if ((this._assignment == null))
- {
- this._assignment = new EntityCollection<Assignment>(this, "Assignment", this.FilterAssignment, this.AttachAssignment, this.DetachAssignment);
- }
- return this._assignment;
- }
- }
-
- /// <summary>
- /// Gets or sets the associated <see cref="Course"/> entity.
- /// </summary>
- [Association("Course_Participation", "CourseId", "Id", IsForeignKey=true)]
- [XmlIgnore()]
- public Course Course
- {
- get
- {
- if ((this._course == null))
- {
- this._course = new EntityRef<Course>(this, "Course", this.FilterCourse);
- }
- return this._course.Entity;
- }
- set
- {
- Course previous = this.Course;
- if ((previous != value))
- {
- this.ValidateProperty("Course", value);
- if ((previous != null))
- {
- this._course.Entity = null;
- previous.Participation.Remove(this);
- }
- if ((value != null))
- {
- this.CourseId = value.Id;
- }
- else
- {
- this.CourseId = default(int);
- }
- this._course.Entity = value;
- if ((value != null))
- {
- value.Participation.Add(this);
- }
- this.RaisePropertyChanged("Course");
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'CourseId' value.
- /// </summary>
- [DataMember()]
- [RoundtripOriginal()]
- public int CourseId
- {
- get
- {
- return this._courseId;
- }
- set
- {
- if ((this._courseId != value))
- {
- this.OnCourseIdChanging(value);
- this.RaiseDataMemberChanging("CourseId");
- this.ValidateProperty("CourseId", value);
- this._courseId = value;
- this.RaiseDataMemberChanged("CourseId");
- this.OnCourseIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Id' value.
- /// </summary>
- [DataMember()]
- [Editable(false, AllowInitialValue=true)]
- [Key()]
- [RoundtripOriginal()]
- public int Id
- {
- get
- {
- return this._id;
- }
- set
- {
- if ((this._id != value))
- {
- this.OnIdChanging(value);
- this.ValidateProperty("Id", value);
- this._id = value;
- this.RaisePropertyChanged("Id");
- this.OnIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'State' value.
- /// </summary>
- [DataMember()]
- public byte[] State
- {
- get
- {
- return this._state;
- }
- set
- {
- if ((this._state != value))
- {
- this.OnStateChanging(value);
- this.RaiseDataMemberChanging("State");
- this.ValidateProperty("State", value);
- this._state = value;
- this.RaiseDataMemberChanged("State");
- this.OnStateChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the associated <see cref="User"/> entity.
- /// </summary>
- [Association("User_Participation", "UserId", "Id", IsForeignKey=true)]
- [XmlIgnore()]
- public User User
- {
- get
- {
- if ((this._user == null))
- {
- this._user = new EntityRef<User>(this, "User", this.FilterUser);
- }
- return this._user.Entity;
- }
- set
- {
- User previous = this.User;
- if ((previous != value))
- {
- this.ValidateProperty("User", value);
- if ((previous != null))
- {
- this._user.Entity = null;
- previous.Participation.Remove(this);
- }
- if ((value != null))
- {
- this.UserId = value.Id;
- }
- else
- {
- this.UserId = default(int);
- }
- this._user.Entity = value;
- if ((value != null))
- {
- value.Participation.Add(this);
- }
- this.RaisePropertyChanged("User");
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'UserId' value.
- /// </summary>
- [DataMember()]
- [RoundtripOriginal()]
- public int UserId
- {
- get
- {
- return this._userId;
- }
- set
- {
- if ((this._userId != value))
- {
- this.OnUserIdChanging(value);
- this.RaiseDataMemberChanging("UserId");
- this.ValidateProperty("UserId", value);
- this._userId = value;
- this.RaiseDataMemberChanged("UserId");
- this.OnUserIdChanged();
- }
- }
- }
-
- private void AttachAssignment(Assignment entity)
- {
- entity.Participation = this;
- }
-
- private void DetachAssignment(Assignment entity)
- {
- entity.Participation = null;
- }
-
- private bool FilterAssignment(Assignment entity)
- {
- return (entity.ParticipationId == this.Id);
- }
-
- private bool FilterCourse(Course entity)
- {
- return (entity.Id == this.CourseId);
- }
-
- private bool FilterUser(User entity)
- {
- return (entity.Id == this.UserId);
- }
-
- /// <summary>
- /// Computes a value from the key fields that uniquely identifies this entity instance.
- /// </summary>
- /// <returns>An object instance that uniquely identifies this entity instance.</returns>
- public override object GetIdentity()
- {
- return this._id;
- }
- }
-
- /// <summary>
- /// The 'Problem' entity class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
- public sealed partial class Problem : Entity
- {
-
- private EntityCollection<Assignment> _assignment;
-
- private string _filePath;
-
- private Nullable<int> _groupId;
-
- private int _id;
-
- private string _name;
-
- private EntityRef<ProblemGroup> _problemGroup;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnFilePathChanging(string value);
- partial void OnFilePathChanged();
- partial void OnGroupIdChanging(Nullable<int> value);
- partial void OnGroupIdChanged();
- partial void OnIdChanging(int value);
- partial void OnIdChanged();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="Problem"/> class.
- /// </summary>
- public Problem()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets the collection of associated <see cref="Assignment"/> entity instances.
- /// </summary>
- [Association("Problem_Assignment", "Id", "ProblemId")]
- [XmlIgnore()]
- public EntityCollection<Assignment> Assignment
- {
- get
- {
- if ((this._assignment == null))
- {
- this._assignment = new EntityCollection<Assignment>(this, "Assignment", this.FilterAssignment, this.AttachAssignment, this.DetachAssignment);
- }
- return this._assignment;
- }
- }
-
- /// <summary>
- /// Gets or sets the 'FilePath' value.
- /// </summary>
- [DataMember()]
- public string FilePath
- {
- get
- {
- return this._filePath;
- }
- set
- {
- if ((this._filePath != value))
- {
- this.OnFilePathChanging(value);
- this.RaiseDataMemberChanging("FilePath");
- this.ValidateProperty("FilePath", value);
- this._filePath = value;
- this.RaiseDataMemberChanged("FilePath");
- this.OnFilePathChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'GroupId' value.
- /// </summary>
- [DataMember()]
- [RoundtripOriginal()]
- public Nullable<int> GroupId
- {
- get
- {
- return this._groupId;
- }
- set
- {
- if ((this._groupId != value))
- {
- this.OnGroupIdChanging(value);
- this.RaiseDataMemberChanging("GroupId");
- this.ValidateProperty("GroupId", value);
- this._groupId = value;
- this.RaiseDataMemberChanged("GroupId");
- this.OnGroupIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Id' value.
- /// </summary>
- [DataMember()]
- [Editable(false, AllowInitialValue=true)]
- [Key()]
- [RoundtripOriginal()]
- public int Id
- {
- get
- {
- return this._id;
- }
- set
- {
- if ((this._id != value))
- {
- this.OnIdChanging(value);
- this.ValidateProperty("Id", value);
- this._id = value;
- this.RaisePropertyChanged("Id");
- this.OnIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Name' value.
- /// </summary>
- [DataMember()]
- [Required()]
- public string Name
- {
- get
- {
- return this._name;
- }
- set
- {
- if ((this._name != value))
- {
- this.OnNameChanging(value);
- this.RaiseDataMemberChanging("Name");
- this.ValidateProperty("Name", value);
- this._name = value;
- this.RaiseDataMemberChanged("Name");
- this.OnNameChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the associated <see cref="ProblemGroup"/> entity.
- /// </summary>
- [Association("ProblemGroup_Problem", "GroupId", "Id", IsForeignKey=true)]
- [XmlIgnore()]
- public ProblemGroup ProblemGroup
- {
- get
- {
- if ((this._problemGroup == null))
- {
- this._problemGroup = new EntityRef<ProblemGroup>(this, "ProblemGroup", this.FilterProblemGroup);
- }
- return this._problemGroup.Entity;
- }
- set
- {
- ProblemGroup previous = this.ProblemGroup;
- if ((previous != value))
- {
- this.ValidateProperty("ProblemGroup", value);
- if ((previous != null))
- {
- this._problemGroup.Entity = null;
- previous.Problem.Remove(this);
- }
- if ((value != null))
- {
- this.GroupId = value.Id;
- }
- else
- {
- this.GroupId = default(Nullable<int>);
- }
- this._problemGroup.Entity = value;
- if ((value != null))
- {
- value.Problem.Add(this);
- }
- this.RaisePropertyChanged("ProblemGroup");
- }
- }
- }
-
- private void AttachAssignment(Assignment entity)
- {
- entity.Problem = this;
- }
-
- private void DetachAssignment(Assignment entity)
- {
- entity.Problem = null;
- }
-
- private bool FilterAssignment(Assignment entity)
- {
- return (entity.ProblemId == this.Id);
- }
-
- private bool FilterProblemGroup(ProblemGroup entity)
- {
- return (entity.Id == this.GroupId);
- }
-
- /// <summary>
- /// Computes a value from the key fields that uniquely identifies this entity instance.
- /// </summary>
- /// <returns>An object instance that uniquely identifies this entity instance.</returns>
- public override object GetIdentity()
- {
- return this._id;
- }
- }
-
- /// <summary>
- /// The 'ProblemGroup' entity class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
- public sealed partial class ProblemGroup : Entity
- {
-
- private EntityCollection<ProblemGroup> _children;
-
- private int _id;
-
- private string _name;
-
- private EntityRef<ProblemGroup> _parent;
-
- private Nullable<int> _parentId;
-
- private EntityCollection<Problem> _problem;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnIdChanging(int value);
- partial void OnIdChanged();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
- partial void OnParentIdChanging(Nullable<int> value);
- partial void OnParentIdChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ProblemGroup"/> class.
- /// </summary>
- public ProblemGroup()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets the collection of associated <see cref="ProblemGroup"/> entity instances.
- /// </summary>
- [Association("ProblemGroup_ProblemGroup", "Id", "ParentId")]
- [XmlIgnore()]
- public EntityCollection<ProblemGroup> Children
- {
- get
- {
- if ((this._children == null))
- {
- this._children = new EntityCollection<ProblemGroup>(this, "Children", this.FilterChildren, this.AttachChildren, this.DetachChildren);
- }
- return this._children;
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Id' value.
- /// </summary>
- [DataMember()]
- [Editable(false, AllowInitialValue=true)]
- [Key()]
- [RoundtripOriginal()]
- public int Id
- {
- get
- {
- return this._id;
- }
- set
- {
- if ((this._id != value))
- {
- this.OnIdChanging(value);
- this.ValidateProperty("Id", value);
- this._id = value;
- this.RaisePropertyChanged("Id");
- this.OnIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Name' value.
- /// </summary>
- [DataMember()]
- [Required()]
- public string Name
- {
- get
- {
- return this._name;
- }
- set
- {
- if ((this._name != value))
- {
- this.OnNameChanging(value);
- this.RaiseDataMemberChanging("Name");
- this.ValidateProperty("Name", value);
- this._name = value;
- this.RaiseDataMemberChanged("Name");
- this.OnNameChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the associated <see cref="ProblemGroup"/> entity.
- /// </summary>
- [Association("ProblemGroup_ProblemGroup", "ParentId", "Id", IsForeignKey=true)]
- [XmlIgnore()]
- public ProblemGroup Parent
- {
- get
- {
- if ((this._parent == null))
- {
- this._parent = new EntityRef<ProblemGroup>(this, "Parent", this.FilterParent);
- }
- return this._parent.Entity;
- }
- set
- {
- ProblemGroup previous = this.Parent;
- if ((previous != value))
- {
- this.ValidateProperty("Parent", value);
- if ((previous != null))
- {
- this._parent.Entity = null;
- previous.Children.Remove(this);
- }
- if ((value != null))
- {
- this.ParentId = value.Id;
- }
- else
- {
- this.ParentId = default(Nullable<int>);
- }
- this._parent.Entity = value;
- if ((value != null))
- {
- value.Children.Add(this);
- }
- this.RaisePropertyChanged("Parent");
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'ParentId' value.
- /// </summary>
- [DataMember()]
- [RoundtripOriginal()]
- public Nullable<int> ParentId
- {
- get
- {
- return this._parentId;
- }
- set
- {
- if ((this._parentId != value))
- {
- this.OnParentIdChanging(value);
- this.RaiseDataMemberChanging("ParentId");
- this.ValidateProperty("ParentId", value);
- this._parentId = value;
- this.RaiseDataMemberChanged("ParentId");
- this.OnParentIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets the collection of associated <see cref="Problem"/> entity instances.
- /// </summary>
- [Association("ProblemGroup_Problem", "Id", "GroupId")]
- [XmlIgnore()]
- public EntityCollection<Problem> Problem
- {
- get
- {
- if ((this._problem == null))
- {
- this._problem = new EntityCollection<Problem>(this, "Problem", this.FilterProblem, this.AttachProblem, this.DetachProblem);
- }
- return this._problem;
- }
- }
-
- private void AttachChildren(ProblemGroup entity)
- {
- entity.Parent = this;
- }
-
- private void DetachChildren(ProblemGroup entity)
- {
- entity.Parent = null;
- }
-
- private bool FilterChildren(ProblemGroup entity)
- {
- return (entity.ParentId == this.Id);
- }
-
- private bool FilterParent(ProblemGroup entity)
- {
- return (entity.Id == this.ParentId);
- }
-
- private void AttachProblem(Problem entity)
- {
- entity.ProblemGroup = this;
- }
-
- private void DetachProblem(Problem entity)
- {
- entity.ProblemGroup = null;
- }
-
- private bool FilterProblem(Problem entity)
- {
- return (entity.GroupId == this.Id);
- }
-
- /// <summary>
- /// Computes a value from the key fields that uniquely identifies this entity instance.
- /// </summary>
- /// <returns>An object instance that uniquely identifies this entity instance.</returns>
- public override object GetIdentity()
- {
- return this._id;
- }
- }
-
- /// <summary>
- /// The 'Submission' entity class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
- public sealed partial class Submission : Entity
- {
-
- private EntityRef<Assignment> _assignment;
-
- private int _assignmentId;
-
- private string _filePath;
-
- private int _id;
-
- private string _lang;
-
- private string _result;
-
- private DateTime _time;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnAssignmentIdChanging(int value);
- partial void OnAssignmentIdChanged();
- partial void OnFilePathChanging(string value);
- partial void OnFilePathChanged();
- partial void OnIdChanging(int value);
- partial void OnIdChanged();
- partial void OnLangChanging(string value);
- partial void OnLangChanged();
- partial void OnResultChanging(string value);
- partial void OnResultChanged();
- partial void OnTimeChanging(DateTime value);
- partial void OnTimeChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="Submission"/> class.
- /// </summary>
- public Submission()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the associated <see cref="Assignment"/> entity.
- /// </summary>
- [Association("Assignment_Submission", "AssignmentId", "Id", IsForeignKey=true)]
- [XmlIgnore()]
- public Assignment Assignment
- {
- get
- {
- if ((this._assignment == null))
- {
- this._assignment = new EntityRef<Assignment>(this, "Assignment", this.FilterAssignment);
- }
- return this._assignment.Entity;
- }
- set
- {
- Assignment previous = this.Assignment;
- if ((previous != value))
- {
- this.ValidateProperty("Assignment", value);
- if ((previous != null))
- {
- this._assignment.Entity = null;
- previous.Submission.Remove(this);
- }
- if ((value != null))
- {
- this.AssignmentId = value.Id;
- }
- else
- {
- this.AssignmentId = default(int);
- }
- this._assignment.Entity = value;
- if ((value != null))
- {
- value.Submission.Add(this);
- }
- this.RaisePropertyChanged("Assignment");
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'AssignmentId' value.
- /// </summary>
- [DataMember()]
- [RoundtripOriginal()]
- public int AssignmentId
- {
- get
- {
- return this._assignmentId;
- }
- set
- {
- if ((this._assignmentId != value))
- {
- this.OnAssignmentIdChanging(value);
- this.RaiseDataMemberChanging("AssignmentId");
- this.ValidateProperty("AssignmentId", value);
- this._assignmentId = value;
- this.RaiseDataMemberChanged("AssignmentId");
- this.OnAssignmentIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'FilePath' value.
- /// </summary>
- [DataMember()]
- public string FilePath
- {
- get
- {
- return this._filePath;
- }
- set
- {
- if ((this._filePath != value))
- {
- this.OnFilePathChanging(value);
- this.RaiseDataMemberChanging("FilePath");
- this.ValidateProperty("FilePath", value);
- this._filePath = value;
- this.RaiseDataMemberChanged("FilePath");
- this.OnFilePathChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Id' value.
- /// </summary>
- [DataMember()]
- [Editable(false, AllowInitialValue=true)]
- [Key()]
- [RoundtripOriginal()]
- public int Id
- {
- get
- {
- return this._id;
- }
- set
- {
- if ((this._id != value))
- {
- this.OnIdChanging(value);
- this.ValidateProperty("Id", value);
- this._id = value;
- this.RaisePropertyChanged("Id");
- this.OnIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Lang' value.
- /// </summary>
- [DataMember()]
- public string Lang
- {
- get
- {
- return this._lang;
- }
- set
- {
- if ((this._lang != value))
- {
- this.OnLangChanging(value);
- this.RaiseDataMemberChanging("Lang");
- this.ValidateProperty("Lang", value);
- this._lang = value;
- this.RaiseDataMemberChanged("Lang");
- this.OnLangChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Result' value.
- /// </summary>
- [DataMember()]
- [Required()]
- public string Result
- {
- get
- {
- return this._result;
- }
- set
- {
- if ((this._result != value))
- {
- this.OnResultChanging(value);
- this.RaiseDataMemberChanging("Result");
- this.ValidateProperty("Result", value);
- this._result = value;
- this.RaiseDataMemberChanged("Result");
- this.OnResultChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Time' value.
- /// </summary>
- [DataMember()]
- public DateTime Time
- {
- get
- {
- return this._time;
- }
- set
- {
- if ((this._time != value))
- {
- this.OnTimeChanging(value);
- this.RaiseDataMemberChanging("Time");
- this.ValidateProperty("Time", value);
- this._time = value;
- this.RaiseDataMemberChanged("Time");
- this.OnTimeChanged();
- }
- }
- }
-
- private bool FilterAssignment(Assignment entity)
- {
- return (entity.Id == this.AssignmentId);
- }
-
- /// <summary>
- /// Computes a value from the key fields that uniquely identifies this entity instance.
- /// </summary>
- /// <returns>An object instance that uniquely identifies this entity instance.</returns>
- public override object GetIdentity()
- {
- return this._id;
- }
- }
-
- /// <summary>
- /// The 'User' entity class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
- public sealed partial class User : Entity
- {
-
- private int _id;
-
- private EntityCollection<Membership> _membership;
-
- private string _name;
-
- private EntityCollection<Participation> _participation;
-
- private string _password;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnIdChanging(int value);
- partial void OnIdChanged();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
- partial void OnPasswordChanging(string value);
- partial void OnPasswordChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="User"/> class.
- /// </summary>
- public User()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the 'Id' value.
- /// </summary>
- [DataMember()]
- [Editable(false, AllowInitialValue=true)]
- [Key()]
- [RoundtripOriginal()]
- public int Id
- {
- get
- {
- return this._id;
- }
- set
- {
- if ((this._id != value))
- {
- this.OnIdChanging(value);
- this.ValidateProperty("Id", value);
- this._id = value;
- this.RaisePropertyChanged("Id");
- this.OnIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets the collection of associated <see cref="Membership"/> entity instances.
- /// </summary>
- [Association("User_Membership", "Id", "UserId")]
- [XmlIgnore()]
- public EntityCollection<Membership> Membership
- {
- get
- {
- if ((this._membership == null))
- {
- this._membership = new EntityCollection<Membership>(this, "Membership", this.FilterMembership, this.AttachMembership, this.DetachMembership);
- }
- return this._membership;
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Name' value.
- /// </summary>
- [DataMember()]
- [Required()]
- public string Name
- {
- get
- {
- return this._name;
- }
- set
- {
- if ((this._name != value))
- {
- this.OnNameChanging(value);
- this.RaiseDataMemberChanging("Name");
- this.ValidateProperty("Name", value);
- this._name = value;
- this.RaiseDataMemberChanged("Name");
- this.OnNameChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets the collection of associated <see cref="Participation"/> entity instances.
- /// </summary>
- [Association("User_Participation", "Id", "UserId")]
- [XmlIgnore()]
- public EntityCollection<Participation> Participation
- {
- get
- {
- if ((this._participation == null))
- {
- this._participation = new EntityCollection<Participation>(this, "Participation", this.FilterParticipation, this.AttachParticipation, this.DetachParticipation);
- }
- return this._participation;
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Password' value.
- /// </summary>
- [DataMember()]
- [Required()]
- public string Password
- {
- get
- {
- return this._password;
- }
- set
- {
- if ((this._password != value))
- {
- this.OnPasswordChanging(value);
- this.RaiseDataMemberChanging("Password");
- this.ValidateProperty("Password", value);
- this._password = value;
- this.RaiseDataMemberChanged("Password");
- this.OnPasswordChanged();
- }
- }
- }
-
- private void AttachMembership(Membership entity)
- {
- entity.User = this;
- }
-
- private void DetachMembership(Membership entity)
- {
- entity.User = null;
- }
-
- private bool FilterMembership(Membership entity)
- {
- return (entity.UserId == this.Id);
- }
-
- private void AttachParticipation(Participation entity)
- {
- entity.User = this;
- }
-
- private void DetachParticipation(Participation entity)
- {
- entity.User = null;
- }
-
- private bool FilterParticipation(Participation entity)
- {
- return (entity.UserId == this.Id);
- }
-
- /// <summary>
- /// Computes a value from the key fields that uniquely identifies this entity instance.
- /// </summary>
- /// <returns>An object instance that uniquely identifies this entity instance.</returns>
- public override object GetIdentity()
- {
- return this._id;
- }
- }
- }
- namespace glados.Web.Logic
- {
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using System.Linq;
- using System.Runtime.Serialization;
- using System.ServiceModel.DomainServices;
- using System.ServiceModel.DomainServices.Client;
- using System.ServiceModel.DomainServices.Client.ApplicationServices;
-
-
- /// <summary>
- /// The 'CourseTopic' class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Logic")]
- public sealed partial class CourseTopic : ComplexObject
- {
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="CourseTopic"/> class.
- /// </summary>
- public CourseTopic()
- {
- this.OnCreated();
- }
- }
- }
- namespace glados.Web.Logic.Base
- {
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using System.Linq;
- using System.Runtime.Serialization;
- using System.ServiceModel.DomainServices;
- using System.ServiceModel.DomainServices.Client;
- using System.ServiceModel.DomainServices.Client.ApplicationServices;
-
-
- /// <summary>
- /// The 'ParticipantState' class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Logic.Base")]
- public sealed partial class ParticipantState : ComplexObject
- {
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ParticipantState"/> class.
- /// </summary>
- public ParticipantState()
- {
- this.OnCreated();
- }
- }
- }
- namespace glados.Web.Services
- {
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using System.Linq;
- using System.ServiceModel;
- using System.ServiceModel.DomainServices;
- using System.ServiceModel.DomainServices.Client;
- using System.ServiceModel.DomainServices.Client.ApplicationServices;
- using System.ServiceModel.Web;
- using glados.Web;
- using glados.Web.Services.Entities;
-
-
- /// <summary>
- /// The DomainContext corresponding to the 'MessageService' DomainService.
- /// </summary>
- public sealed partial class MessageContext : DomainContext
- {
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="MessageContext"/> class.
- /// </summary>
- public MessageContext() :
- this(new WebDomainClient<IMessageServiceContract>(new Uri("glados-Web-Services-MessageService.svc", UriKind.Relative)))
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="MessageContext"/> class with the specified service URI.
- /// </summary>
- /// <param name="serviceUri">The MessageService service URI.</param>
- public MessageContext(Uri serviceUri) :
- this(new WebDomainClient<IMessageServiceContract>(serviceUri))
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="MessageContext"/> class with the specified <paramref name="domainClient"/>.
- /// </summary>
- /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
- public MessageContext(DomainClient domainClient) :
- base(domainClient)
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets the set of <see cref="Message"/> entity instances that have been loaded into this <see cref="MessageContext"/> instance.
- /// </summary>
- public EntitySet<Message> Messages
- {
- get
- {
- return base.EntityContainer.GetEntitySet<Message>();
- }
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="Message"/> entity instances using the 'GetMessageById' query.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of the query.</param>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Message"/> entity instances.</returns>
- public EntityQuery<Message> GetMessageByIdQuery(int id)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("id", id);
- this.ValidateMethod("GetMessageByIdQuery", parameters);
- return base.CreateQuery<Message>("GetMessageById", parameters, false, false);
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="Message"/> entity instances using the 'GetMessages' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Message"/> entity instances.</returns>
- public EntityQuery<Message> GetMessagesQuery()
- {
- this.ValidateMethod("GetMessagesQuery", null);
- return base.CreateQuery<Message>("GetMessages", null, false, true);
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="Message"/> entity instances using the 'GetMyReceivedMessages' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Message"/> entity instances.</returns>
- public EntityQuery<Message> GetMyReceivedMessagesQuery()
- {
- this.ValidateMethod("GetMyReceivedMessagesQuery", null);
- return base.CreateQuery<Message>("GetMyReceivedMessages", null, false, true);
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="Message"/> entity instances using the 'GetMySentMessages' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Message"/> entity instances.</returns>
- public EntityQuery<Message> GetMySentMessagesQuery()
- {
- this.ValidateMethod("GetMySentMessagesQuery", null);
- return base.CreateQuery<Message>("GetMySentMessages", null, false, true);
- }
-
- /// <summary>
- /// Creates a new EntityContainer for this DomainContext's EntitySets.
- /// </summary>
- /// <returns>A new container instance.</returns>
- protected override EntityContainer CreateEntityContainer()
- {
- return new MessageContextEntityContainer();
- }
-
- /// <summary>
- /// Service contract for the 'MessageService' DomainService.
- /// </summary>
- [ServiceContract()]
- public interface IMessageServiceContract
- {
-
- /// <summary>
- /// Asynchronously invokes the 'GetMessageById' operation.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/MessageService/GetMessageByIdDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/MessageService/GetMessageById", ReplyAction="http://tempuri.org/MessageService/GetMessageByIdResponse")]
- [WebGet()]
- IAsyncResult BeginGetMessageById(int id, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetMessageById'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetMessageById'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetMessageById' operation.</returns>
- QueryResult<Message> EndGetMessageById(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetMessages' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/MessageService/GetMessagesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/MessageService/GetMessages", ReplyAction="http://tempuri.org/MessageService/GetMessagesResponse")]
- [WebGet()]
- IAsyncResult BeginGetMessages(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetMessages'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetMessages'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetMessages' operation.</returns>
- QueryResult<Message> EndGetMessages(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetMyReceivedMessages' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/MessageService/GetMyReceivedMessagesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/MessageService/GetMyReceivedMessages", ReplyAction="http://tempuri.org/MessageService/GetMyReceivedMessagesResponse")]
- [WebGet()]
- IAsyncResult BeginGetMyReceivedMessages(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetMyReceivedMessages'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetMyReceivedMessages'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetMyReceivedMessages' operation.</returns>
- QueryResult<Message> EndGetMyReceivedMessages(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetMySentMessages' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/MessageService/GetMySentMessagesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/MessageService/GetMySentMessages", ReplyAction="http://tempuri.org/MessageService/GetMySentMessagesResponse")]
- [WebGet()]
- IAsyncResult BeginGetMySentMessages(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetMySentMessages'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetMySentMessages'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetMySentMessages' operation.</returns>
- QueryResult<Message> EndGetMySentMessages(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'SubmitChanges' operation.
- /// </summary>
- /// <param name="changeSet">The change-set to submit.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/MessageService/SubmitChangesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/MessageService/SubmitChanges", ReplyAction="http://tempuri.org/MessageService/SubmitChangesResponse")]
- IAsyncResult BeginSubmitChanges(IEnumerable<ChangeSetEntry> changeSet, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginSubmitChanges'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginSubmitChanges'.</param>
- /// <returns>The collection of change-set entry elements returned from 'SubmitChanges'.</returns>
- IEnumerable<ChangeSetEntry> EndSubmitChanges(IAsyncResult result);
- }
-
- internal sealed class MessageContextEntityContainer : EntityContainer
- {
-
- public MessageContextEntityContainer()
- {
- this.CreateEntitySet<Message>(EntitySetOperations.All);
- }
- }
- }
-
- /// <summary>
- /// The DomainContext corresponding to the 'StatusService' DomainService.
- /// </summary>
- public sealed partial class StatusContext : DomainContext
- {
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="StatusContext"/> class.
- /// </summary>
- public StatusContext() :
- this(new WebDomainClient<IStatusServiceContract>(new Uri("glados-Web-Services-StatusService.svc", UriKind.Relative)))
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="StatusContext"/> class with the specified service URI.
- /// </summary>
- /// <param name="serviceUri">The StatusService service URI.</param>
- public StatusContext(Uri serviceUri) :
- this(new WebDomainClient<IStatusServiceContract>(serviceUri))
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="StatusContext"/> class with the specified <paramref name="domainClient"/>.
- /// </summary>
- /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
- public StatusContext(DomainClient domainClient) :
- base(domainClient)
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets the set of <see cref="TestingMachineEntity"/> entity instances that have been loaded into this <see cref="StatusContext"/> instance.
- /// </summary>
- public EntitySet<TestingMachineEntity> TestingMachineEntities
- {
- get
- {
- return base.EntityContainer.GetEntitySet<TestingMachineEntity>();
- }
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="TestingMachineEntity"/> entity instances using the 'GetTesterStatus' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="TestingMachineEntity"/> entity instances.</returns>
- public EntityQuery<TestingMachineEntity> GetTesterStatusQuery()
- {
- this.ValidateMethod("GetTesterStatusQuery", null);
- return base.CreateQuery<TestingMachineEntity>("GetTesterStatus", null, false, true);
- }
-
- /// <summary>
- /// Asynchronously invokes the 'ReloadProblemsIntoDb' method of the DomainService.
- /// </summary>
- /// <param name="callback">Callback to invoke when the operation completes.</param>
- /// <param name="userState">Value to pass to the callback. It can be <c>null</c>.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation ReloadProblemsIntoDb(Action<InvokeOperation> callback, object userState)
- {
- this.ValidateMethod("ReloadProblemsIntoDb", null);
- return this.InvokeOperation("ReloadProblemsIntoDb", typeof(void), null, true, callback, userState);
- }
-
- /// <summary>
- /// Asynchronously invokes the 'ReloadProblemsIntoDb' method of the DomainService.
- /// </summary>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation ReloadProblemsIntoDb()
- {
- this.ValidateMethod("ReloadProblemsIntoDb", null);
- return this.InvokeOperation("ReloadProblemsIntoDb", typeof(void), null, true, null, null);
- }
-
- /// <summary>
- /// Asynchronously invokes the 'RetestSubmission' method of the DomainService.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <param name="callback">Callback to invoke when the operation completes.</param>
- /// <param name="userState">Value to pass to the callback. It can be <c>null</c>.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation RetestSubmission(int id, Action<InvokeOperation> callback, object userState)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("id", id);
- this.ValidateMethod("RetestSubmission", parameters);
- return this.InvokeOperation("RetestSubmission", typeof(void), parameters, true, callback, userState);
- }
-
- /// <summary>
- /// Asynchronously invokes the 'RetestSubmission' method of the DomainService.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation RetestSubmission(int id)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("id", id);
- this.ValidateMethod("RetestSubmission", parameters);
- return this.InvokeOperation("RetestSubmission", typeof(void), parameters, true, null, null);
- }
-
- /// <summary>
- /// Creates a new EntityContainer for this DomainContext's EntitySets.
- /// </summary>
- /// <returns>A new container instance.</returns>
- protected override EntityContainer CreateEntityContainer()
- {
- return new StatusContextEntityContainer();
- }
-
- /// <summary>
- /// Service contract for the 'StatusService' DomainService.
- /// </summary>
- [ServiceContract()]
- public interface IStatusServiceContract
- {
-
- /// <summary>
- /// Asynchronously invokes the 'GetTesterStatus' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/StatusService/GetTesterStatusDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/StatusService/GetTesterStatus", ReplyAction="http://tempuri.org/StatusService/GetTesterStatusResponse")]
- [WebGet()]
- IAsyncResult BeginGetTesterStatus(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetTesterStatus'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetTesterStatus'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetTesterStatus' operation.</returns>
- QueryResult<TestingMachineEntity> EndGetTesterStatus(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'ReloadProblemsIntoDb' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/StatusService/ReloadProblemsIntoDbDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/StatusService/ReloadProblemsIntoDb", ReplyAction="http://tempuri.org/StatusService/ReloadProblemsIntoDbResponse")]
- IAsyncResult BeginReloadProblemsIntoDb(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginReloadProblemsIntoDb'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginReloadProblemsIntoDb'.</param>
- void EndReloadProblemsIntoDb(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'RetestSubmission' operation.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/StatusService/RetestSubmissionDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/StatusService/RetestSubmission", ReplyAction="http://tempuri.org/StatusService/RetestSubmissionResponse")]
- IAsyncResult BeginRetestSubmission(int id, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginRetestSubmission'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginRetestSubmission'.</param>
- void EndRetestSubmission(IAsyncResult result);
- }
-
- internal sealed class StatusContextEntityContainer : EntityContainer
- {
-
- public StatusContextEntityContainer()
- {
- this.CreateEntitySet<TestingMachineEntity>(EntitySetOperations.None);
- }
- }
- }
-
- /// <summary>
- /// The DomainContext corresponding to the 'TaskStructureService' DomainService.
- /// </summary>
- public sealed partial class TaskStructureContext : DomainContext
- {
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="TaskStructureContext"/> class.
- /// </summary>
- public TaskStructureContext() :
- this(new WebDomainClient<ITaskStructureServiceContract>(new Uri("glados-Web-Services-TaskStructureService.svc", UriKind.Relative)))
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="TaskStructureContext"/> class with the specified service URI.
- /// </summary>
- /// <param name="serviceUri">The TaskStructureService service URI.</param>
- public TaskStructureContext(Uri serviceUri) :
- this(new WebDomainClient<ITaskStructureServiceContract>(serviceUri))
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="TaskStructureContext"/> class with the specified <paramref name="domainClient"/>.
- /// </summary>
- /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
- public TaskStructureContext(DomainClient domainClient) :
- base(domainClient)
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets the set of <see cref="Assignment"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
- /// </summary>
- public EntitySet<Assignment> Assignments
- {
- get
- {
- return base.EntityContainer.GetEntitySet<Assignment>();
- }
- }
-
- /// <summary>
- /// Gets the set of <see cref="Course"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
- /// </summary>
- public EntitySet<Course> Courses
- {
- get
- {
- return base.EntityContainer.GetEntitySet<Course>();
- }
- }
-
- /// <summary>
- /// Gets the set of <see cref="Group"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
- /// </summary>
- public EntitySet<Group> Groups
- {
- get
- {
- return base.EntityContainer.GetEntitySet<Group>();
- }
- }
-
- /// <summary>
- /// Gets the set of <see cref="Membership"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
- /// </summary>
- public EntitySet<Membership> Memberships
- {
- get
- {
- return base.EntityContainer.GetEntitySet<Membership>();
- }
- }
-
- /// <summary>
- /// Gets the set of <see cref="Participation"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
- /// </summary>
- public EntitySet<Participation> Participations
- {
- get
- {
- return base.EntityContainer.GetEntitySet<Participation>();
- }
- }
-
- /// <summary>
- /// Gets the set of <see cref="ProblemGroup"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
- /// </summary>
- public EntitySet<ProblemGroup> ProblemGroups
- {
- get
- {
- return base.EntityContainer.GetEntitySet<ProblemGroup>();
- }
- }
-
- /// <summary>
- /// Gets the set of <see cref="Problem"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
- /// </summary>
- public EntitySet<Problem> Problems
- {
- get
- {
- return base.EntityContainer.GetEntitySet<Problem>();
- }
- }
-
- /// <summary>
- /// Gets the set of <see cref="Submission"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
- /// </summary>
- public EntitySet<Submission> Submissions
- {
- get
- {
- return base.EntityContainer.GetEntitySet<Submission>();
- }
- }
-
- /// <summary>
- /// Gets the set of <see cref="User"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
- /// </summary>
- public EntitySet<User> Users
- {
- get
- {
- return base.EntityContainer.GetEntitySet<User>();
- }
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="Assignment"/> entity instances using the 'GetAssignmentSet' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Assignment"/> entity instances.</returns>
- public EntityQuery<Assignment> GetAssignmentSetQuery()
- {
- this.ValidateMethod("GetAssignmentSetQuery", null);
- return base.CreateQuery<Assignment>("GetAssignmentSet", null, false, true);
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="Assignment"/> entity instances using the 'GetAssignmentsForMe' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Assignment"/> entity instances.</returns>
- public EntityQuery<Assignment> GetAssignmentsForMeQuery()
- {
- this.ValidateMethod("GetAssignmentsForMeQuery", null);
- return base.CreateQuery<Assignment>("GetAssignmentsForMe", null, false, true);
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="Course"/> entity instances using the 'GetCourseSet' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Course"/> entity instances.</returns>
- public EntityQuery<Course> GetCourseSetQuery()
- {
- this.ValidateMethod("GetCourseSetQuery", null);
- return base.CreateQuery<Course>("GetCourseSet", null, false, true);
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="Group"/> entity instances using the 'GetGroupSet' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Group"/> entity instances.</returns>
- public EntityQuery<Group> GetGroupSetQuery()
- {
- this.ValidateMethod("GetGroupSetQuery", null);
- return base.CreateQuery<Group>("GetGroupSet", null, false, true);
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="Membership"/> entity instances using the 'GetMembershipSet' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Membership"/> entity instances.</returns>
- public EntityQuery<Membership> GetMembershipSetQuery()
- {
- this.ValidateMethod("GetMembershipSetQuery", null);
- return base.CreateQuery<Membership>("GetMembershipSet", null, false, true);
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="Participation"/> entity instances using the 'GetParticipationSet' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Participation"/> entity instances.</returns>
- public EntityQuery<Participation> GetParticipationSetQuery()
- {
- this.ValidateMethod("GetParticipationSetQuery", null);
- return base.CreateQuery<Participation>("GetParticipationSet", null, false, true);
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="ProblemGroup"/> entity instances using the 'GetProblemGroupSet' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="ProblemGroup"/> entity instances.</returns>
- public EntityQuery<ProblemGroup> GetProblemGroupSetQuery()
- {
- this.ValidateMethod("GetProblemGroupSetQuery", null);
- return base.CreateQuery<ProblemGroup>("GetProblemGroupSet", null, false, true);
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="Problem"/> entity instances using the 'GetProblemSet' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Problem"/> entity instances.</returns>
- public EntityQuery<Problem> GetProblemSetQuery()
- {
- this.ValidateMethod("GetProblemSetQuery", null);
- return base.CreateQuery<Problem>("GetProblemSet", null, false, true);
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="Problem"/> entity instances using the 'GetProblemSetByGroupId' query.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of the query.</param>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Problem"/> entity instances.</returns>
- public EntityQuery<Problem> GetProblemSetByGroupIdQuery(int id)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("id", id);
- this.ValidateMethod("GetProblemSetByGroupIdQuery", parameters);
- return base.CreateQuery<Problem>("GetProblemSetByGroupId", parameters, false, true);
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="Submission"/> entity instances using the 'GetSubmissionSet' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Submission"/> entity instances.</returns>
- public EntityQuery<Submission> GetSubmissionSetQuery()
- {
- this.ValidateMethod("GetSubmissionSetQuery", null);
- return base.CreateQuery<Submission>("GetSubmissionSet", null, false, true);
- }
-
- /// <summary>
- /// Gets an EntityQuery instance that can be used to load <see cref="User"/> entity instances using the 'GetUsers' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="User"/> entity instances.</returns>
- public EntityQuery<User> GetUsersQuery()
- {
- this.ValidateMethod("GetUsersQuery", null);
- return base.CreateQuery<User>("GetUsers", null, false, true);
- }
-
- /// <summary>
- /// Creates a new EntityContainer for this DomainContext's EntitySets.
- /// </summary>
- /// <returns>A new container instance.</returns>
- protected override EntityContainer CreateEntityContainer()
- {
- return new TaskStructureContextEntityContainer();
- }
-
- /// <summary>
- /// Service contract for the 'TaskStructureService' DomainService.
- /// </summary>
- [ServiceContract()]
- public interface ITaskStructureServiceContract
- {
-
- /// <summary>
- /// Asynchronously invokes the 'GetAssignmentSet' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetAssignmentSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetAssignmentSet", ReplyAction="http://tempuri.org/TaskStructureService/GetAssignmentSetResponse")]
- [WebGet()]
- IAsyncResult BeginGetAssignmentSet(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetAssignmentSet'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetAssignmentSet'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetAssignmentSet' operation.</returns>
- QueryResult<Assignment> EndGetAssignmentSet(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetAssignmentsForMe' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetAssignmentsForMeDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetAssignmentsForMe", ReplyAction="http://tempuri.org/TaskStructureService/GetAssignmentsForMeResponse")]
- [WebGet()]
- IAsyncResult BeginGetAssignmentsForMe(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetAssignmentsForMe'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetAssignmentsForMe'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetAssignmentsForMe' operation.</returns>
- QueryResult<Assignment> EndGetAssignmentsForMe(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetCourseSet' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetCourseSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetCourseSet", ReplyAction="http://tempuri.org/TaskStructureService/GetCourseSetResponse")]
- [WebGet()]
- IAsyncResult BeginGetCourseSet(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetCourseSet'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetCourseSet'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetCourseSet' operation.</returns>
- QueryResult<Course> EndGetCourseSet(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetGroupSet' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetGroupSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetGroupSet", ReplyAction="http://tempuri.org/TaskStructureService/GetGroupSetResponse")]
- [WebGet()]
- IAsyncResult BeginGetGroupSet(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetGroupSet'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetGroupSet'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetGroupSet' operation.</returns>
- QueryResult<Group> EndGetGroupSet(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetMembershipSet' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetMembershipSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetMembershipSet", ReplyAction="http://tempuri.org/TaskStructureService/GetMembershipSetResponse")]
- [WebGet()]
- IAsyncResult BeginGetMembershipSet(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetMembershipSet'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetMembershipSet'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetMembershipSet' operation.</returns>
- QueryResult<Membership> EndGetMembershipSet(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetParticipationSet' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetParticipationSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetParticipationSet", ReplyAction="http://tempuri.org/TaskStructureService/GetParticipationSetResponse")]
- [WebGet()]
- IAsyncResult BeginGetParticipationSet(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetParticipationSet'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetParticipationSet'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetParticipationSet' operation.</returns>
- QueryResult<Participation> EndGetParticipationSet(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetProblemGroupSet' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetProblemGroupSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetProblemGroupSet", ReplyAction="http://tempuri.org/TaskStructureService/GetProblemGroupSetResponse")]
- [WebGet()]
- IAsyncResult BeginGetProblemGroupSet(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetProblemGroupSet'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetProblemGroupSet'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetProblemGroupSet' operation.</returns>
- QueryResult<ProblemGroup> EndGetProblemGroupSet(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetProblemSet' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetProblemSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetProblemSet", ReplyAction="http://tempuri.org/TaskStructureService/GetProblemSetResponse")]
- [WebGet()]
- IAsyncResult BeginGetProblemSet(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetProblemSet'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetProblemSet'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetProblemSet' operation.</returns>
- QueryResult<Problem> EndGetProblemSet(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetProblemSetByGroupId' operation.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetProblemSetByGroupIdDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetProblemSetByGroupId", ReplyAction="http://tempuri.org/TaskStructureService/GetProblemSetByGroupIdResponse")]
- [WebGet()]
- IAsyncResult BeginGetProblemSetByGroupId(int id, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetProblemSetByGroupId'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetProblemSetByGroupId'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetProblemSetByGroupId' operation.</returns>
- QueryResult<Problem> EndGetProblemSetByGroupId(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetSubmissionSet' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetSubmissionSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetSubmissionSet", ReplyAction="http://tempuri.org/TaskStructureService/GetSubmissionSetResponse")]
- [WebGet()]
- IAsyncResult BeginGetSubmissionSet(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetSubmissionSet'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetSubmissionSet'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetSubmissionSet' operation.</returns>
- QueryResult<Submission> EndGetSubmissionSet(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetUsers' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetUsersDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetUsers", ReplyAction="http://tempuri.org/TaskStructureService/GetUsersResponse")]
- [WebGet()]
- IAsyncResult BeginGetUsers(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetUsers'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetUsers'.</param>
- /// <returns>The 'QueryResult' returned from the 'GetUsers' operation.</returns>
- QueryResult<User> EndGetUsers(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'SubmitChanges' operation.
- /// </summary>
- /// <param name="changeSet">The change-set to submit.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/SubmitChangesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/SubmitChanges", ReplyAction="http://tempuri.org/TaskStructureService/SubmitChangesResponse")]
- IAsyncResult BeginSubmitChanges(IEnumerable<ChangeSetEntry> changeSet, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginSubmitChanges'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginSubmitChanges'.</param>
- /// <returns>The collection of change-set entry elements returned from 'SubmitChanges'.</returns>
- IEnumerable<ChangeSetEntry> EndSubmitChanges(IAsyncResult result);
- }
-
- internal sealed class TaskStructureContextEntityContainer : EntityContainer
- {
-
- public TaskStructureContextEntityContainer()
- {
- this.CreateEntitySet<Assignment>(EntitySetOperations.All);
- this.CreateEntitySet<Course>(EntitySetOperations.All);
- this.CreateEntitySet<Group>(EntitySetOperations.All);
- this.CreateEntitySet<Membership>(EntitySetOperations.All);
- this.CreateEntitySet<Participation>(EntitySetOperations.All);
- this.CreateEntitySet<Problem>(EntitySetOperations.All);
- this.CreateEntitySet<ProblemGroup>(EntitySetOperations.All);
- this.CreateEntitySet<Submission>(EntitySetOperations.All);
- this.CreateEntitySet<User>(EntitySetOperations.All);
- }
- }
- }
- }
- namespace glados.Web.Services.Entities
- {
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using System.Linq;
- using System.Runtime.Serialization;
- using System.ServiceModel.DomainServices;
- using System.ServiceModel.DomainServices.Client;
- using System.ServiceModel.DomainServices.Client.ApplicationServices;
- using System.Xml.Serialization;
- using Glados.TestingModule.Interfaces;
- using glados.Web.Logic;
-
-
- /// <summary>
- /// The 'AssignmentState' class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
- public sealed partial class AssignmentState : ComplexObject
- {
-
- private string _state;
-
- private string _task;
-
- private string _topic;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnStateChanging(string value);
- partial void OnStateChanged();
- partial void OnTaskChanging(string value);
- partial void OnTaskChanged();
- partial void OnTopicChanging(string value);
- partial void OnTopicChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="AssignmentState"/> class.
- /// </summary>
- public AssignmentState()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the 'State' value.
- /// </summary>
- [DataMember()]
- public string State
- {
- get
- {
- return this._state;
- }
- set
- {
- if ((this._state != value))
- {
- this.OnStateChanging(value);
- this.RaiseDataMemberChanging("State");
- this.ValidateProperty("State", value);
- this._state = value;
- this.RaiseDataMemberChanged("State");
- this.OnStateChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Task' value.
- /// </summary>
- [DataMember()]
- public string Task
- {
- get
- {
- return this._task;
- }
- set
- {
- if ((this._task != value))
- {
- this.OnTaskChanging(value);
- this.RaiseDataMemberChanging("Task");
- this.ValidateProperty("Task", value);
- this._task = value;
- this.RaiseDataMemberChanged("Task");
- this.OnTaskChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Topic' value.
- /// </summary>
- [DataMember()]
- public string Topic
- {
- get
- {
- return this._topic;
- }
- set
- {
- if ((this._topic != value))
- {
- this.OnTopicChanging(value);
- this.RaiseDataMemberChanging("Topic");
- this.ValidateProperty("Topic", value);
- this._topic = value;
- this.RaiseDataMemberChanged("Topic");
- this.OnTopicChanged();
- }
- }
- }
- }
-
- /// <summary>
- /// The 'CourseDashboardInfo' class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
- public sealed partial class CourseDashboardInfo : ComplexObject
- {
-
- private CourseParticipantClientState[] _participants;
-
- private CourseTopic[] _topics;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnParticipantsChanging(CourseParticipantClientState[] value);
- partial void OnParticipantsChanged();
- partial void OnTopicsChanging(CourseTopic[] value);
- partial void OnTopicsChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="CourseDashboardInfo"/> class.
- /// </summary>
- public CourseDashboardInfo()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the 'Participants' value.
- /// </summary>
- [DataMember()]
- [Display(AutoGenerateField=false)]
- public CourseParticipantClientState[] Participants
- {
- get
- {
- return this._participants;
- }
- set
- {
- if ((this._participants != value))
- {
- this.OnParticipantsChanging(value);
- this.RaiseDataMemberChanging("Participants");
- this.ValidateProperty("Participants", value);
- this._participants = value;
- this.RaiseDataMemberChanged("Participants");
- this.OnParticipantsChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Topics' value.
- /// </summary>
- [DataMember()]
- [Display(AutoGenerateField=false)]
- public CourseTopic[] Topics
- {
- get
- {
- return this._topics;
- }
- set
- {
- if ((this._topics != value))
- {
- this.OnTopicsChanging(value);
- this.RaiseDataMemberChanging("Topics");
- this.ValidateProperty("Topics", value);
- this._topics = value;
- this.RaiseDataMemberChanged("Topics");
- this.OnTopicsChanged();
- }
- }
- }
- }
-
- /// <summary>
- /// The 'CourseParticipantClientState' class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
- public sealed partial class CourseParticipantClientState : ComplexObject
- {
-
- private AssignmentState[] _assignments;
-
- private int _id;
-
- private string _name;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnAssignmentsChanging(AssignmentState[] value);
- partial void OnAssignmentsChanged();
- partial void OnIdChanging(int value);
- partial void OnIdChanged();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="CourseParticipantClientState"/> class.
- /// </summary>
- public CourseParticipantClientState()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the 'Assignments' value.
- /// </summary>
- [DataMember()]
- [Display(AutoGenerateField=false)]
- public AssignmentState[] Assignments
- {
- get
- {
- return this._assignments;
- }
- set
- {
- if ((this._assignments != value))
- {
- this.OnAssignmentsChanging(value);
- this.RaiseDataMemberChanging("Assignments");
- this.ValidateProperty("Assignments", value);
- this._assignments = value;
- this.RaiseDataMemberChanged("Assignments");
- this.OnAssignmentsChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Id' value.
- /// </summary>
- [DataMember()]
- public int Id
- {
- get
- {
- return this._id;
- }
- set
- {
- if ((this._id != value))
- {
- this.OnIdChanging(value);
- this.RaiseDataMemberChanging("Id");
- this.ValidateProperty("Id", value);
- this._id = value;
- this.RaiseDataMemberChanged("Id");
- this.OnIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Name' value.
- /// </summary>
- [DataMember()]
- public string Name
- {
- get
- {
- return this._name;
- }
- set
- {
- if ((this._name != value))
- {
- this.OnNameChanging(value);
- this.RaiseDataMemberChanging("Name");
- this.ValidateProperty("Name", value);
- this._name = value;
- this.RaiseDataMemberChanged("Name");
- this.OnNameChanged();
- }
- }
- }
- }
-
- /// <summary>
- /// The 'ParticipantAssignment' class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
- public sealed partial class ParticipantAssignment : ComplexObject
- {
-
- private bool _assigned;
-
- private int _participantId;
-
- private string _participantName;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnAssignedChanging(bool value);
- partial void OnAssignedChanged();
- partial void OnParticipantIdChanging(int value);
- partial void OnParticipantIdChanged();
- partial void OnParticipantNameChanging(string value);
- partial void OnParticipantNameChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ParticipantAssignment"/> class.
- /// </summary>
- public ParticipantAssignment()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the 'Assigned' value.
- /// </summary>
- [DataMember()]
- public bool Assigned
- {
- get
- {
- return this._assigned;
- }
- set
- {
- if ((this._assigned != value))
- {
- this.OnAssignedChanging(value);
- this.RaiseDataMemberChanging("Assigned");
- this.ValidateProperty("Assigned", value);
- this._assigned = value;
- this.RaiseDataMemberChanged("Assigned");
- this.OnAssignedChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'ParticipantId' value.
- /// </summary>
- [DataMember()]
- public int ParticipantId
- {
- get
- {
- return this._participantId;
- }
- set
- {
- if ((this._participantId != value))
- {
- this.OnParticipantIdChanging(value);
- this.RaiseDataMemberChanging("ParticipantId");
- this.ValidateProperty("ParticipantId", value);
- this._participantId = value;
- this.RaiseDataMemberChanged("ParticipantId");
- this.OnParticipantIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'ParticipantName' value.
- /// </summary>
- [DataMember()]
- public string ParticipantName
- {
- get
- {
- return this._participantName;
- }
- set
- {
- if ((this._participantName != value))
- {
- this.OnParticipantNameChanging(value);
- this.RaiseDataMemberChanging("ParticipantName");
- this.ValidateProperty("ParticipantName", value);
- this._participantName = value;
- this.RaiseDataMemberChanged("ParticipantName");
- this.OnParticipantNameChanged();
- }
- }
- }
- }
-
- /// <summary>
- /// The 'ProblemDetails' class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
- [XmlRoot(ElementName="task")]
- public sealed partial class ProblemDetails : ComplexObject
- {
-
- private string[] _compilers;
-
- private int _id;
-
- private string _name;
-
- private string _statementPath;
-
- private TestingInformation _testingInformation;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnCompilersChanging(string[] value);
- partial void OnCompilersChanged();
- partial void OnIdChanging(int value);
- partial void OnIdChanged();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
- partial void OnStatementPathChanging(string value);
- partial void OnStatementPathChanged();
- partial void OnTestingInformationChanging(TestingInformation value);
- partial void OnTestingInformationChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ProblemDetails"/> class.
- /// </summary>
- public ProblemDetails()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the 'Compilers' value.
- /// </summary>
- [DataMember()]
- [XmlIgnore()]
- public string[] Compilers
- {
- get
- {
- return this._compilers;
- }
- set
- {
- if ((this._compilers != value))
- {
- this.OnCompilersChanging(value);
- this.RaiseDataMemberChanging("Compilers");
- this.ValidateProperty("Compilers", value);
- this._compilers = value;
- this.RaiseDataMemberChanged("Compilers");
- this.OnCompilersChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Id' value.
- /// </summary>
- [DataMember()]
- [XmlIgnore()]
- public int Id
- {
- get
- {
- return this._id;
- }
- set
- {
- if ((this._id != value))
- {
- this.OnIdChanging(value);
- this.RaiseDataMemberChanging("Id");
- this.ValidateProperty("Id", value);
- this._id = value;
- this.RaiseDataMemberChanged("Id");
- this.OnIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Name' value.
- /// </summary>
- [DataMember()]
- [XmlElement(ElementName="name")]
- public string Name
- {
- get
- {
- return this._name;
- }
- set
- {
- if ((this._name != value))
- {
- this.OnNameChanging(value);
- this.RaiseDataMemberChanging("Name");
- this.ValidateProperty("Name", value);
- this._name = value;
- this.RaiseDataMemberChanged("Name");
- this.OnNameChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'StatementPath' value.
- /// </summary>
- [DataMember()]
- [XmlIgnore()]
- public string StatementPath
- {
- get
- {
- return this._statementPath;
- }
- set
- {
- if ((this._statementPath != value))
- {
- this.OnStatementPathChanging(value);
- this.RaiseDataMemberChanging("StatementPath");
- this.ValidateProperty("StatementPath", value);
- this._statementPath = value;
- this.RaiseDataMemberChanged("StatementPath");
- this.OnStatementPathChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'TestingInformation' value.
- /// </summary>
- [DataMember()]
- [Display(AutoGenerateField=false)]
- [XmlElement(ElementName="testingInfo")]
- public TestingInformation TestingInformation
- {
- get
- {
- return this._testingInformation;
- }
- set
- {
- if ((this._testingInformation != value))
- {
- this.OnTestingInformationChanging(value);
- this.RaiseDataMemberChanging("TestingInformation");
- this.ValidateProperty("TestingInformation", value);
- this._testingInformation = value;
- this.RaiseDataMemberChanged("TestingInformation");
- this.OnTestingInformationChanged();
- }
- }
- }
- }
-
- /// <summary>
- /// The 'TaskIOFile' class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
- public sealed partial class TaskIOFile : ComplexObject
- {
-
- private string _name;
-
- private string _type;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
- partial void OnTypeChanging(string value);
- partial void OnTypeChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="TaskIOFile"/> class.
- /// </summary>
- public TaskIOFile()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the 'Name' value.
- /// </summary>
- [DataMember()]
- [XmlText()]
- public string Name
- {
- get
- {
- return this._name;
- }
- set
- {
- if ((this._name != value))
- {
- this.OnNameChanging(value);
- this.RaiseDataMemberChanging("Name");
- this.ValidateProperty("Name", value);
- this._name = value;
- this.RaiseDataMemberChanged("Name");
- this.OnNameChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Type' value.
- /// </summary>
- [DataMember()]
- [XmlAttribute(AttributeName="type")]
- public string Type
- {
- get
- {
- return this._type;
- }
- set
- {
- if ((this._type != value))
- {
- this.OnTypeChanging(value);
- this.RaiseDataMemberChanging("Type");
- this.ValidateProperty("Type", value);
- this._type = value;
- this.RaiseDataMemberChanged("Type");
- this.OnTypeChanged();
- }
- }
- }
- }
-
- /// <summary>
- /// The 'TestDescriptor' class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
- public sealed partial class TestDescriptor : ComplexObject
- {
-
- private int _id;
-
- private int _memoryLimitMb;
-
- private float _timeLimitSec;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnIdChanging(int value);
- partial void OnIdChanged();
- partial void OnMemoryLimitMbChanging(int value);
- partial void OnMemoryLimitMbChanged();
- partial void OnTimeLimitSecChanging(float value);
- partial void OnTimeLimitSecChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="TestDescriptor"/> class.
- /// </summary>
- public TestDescriptor()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the 'Id' value.
- /// </summary>
- [DataMember()]
- [XmlAttribute(AttributeName="id")]
- public int Id
- {
- get
- {
- return this._id;
- }
- set
- {
- if ((this._id != value))
- {
- this.OnIdChanging(value);
- this.RaiseDataMemberChanging("Id");
- this.ValidateProperty("Id", value);
- this._id = value;
- this.RaiseDataMemberChanged("Id");
- this.OnIdChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'MemoryLimitMb' value.
- /// </summary>
- [DataMember()]
- [XmlAttribute(AttributeName="memoryLimit")]
- public int MemoryLimitMb
- {
- get
- {
- return this._memoryLimitMb;
- }
- set
- {
- if ((this._memoryLimitMb != value))
- {
- this.OnMemoryLimitMbChanging(value);
- this.RaiseDataMemberChanging("MemoryLimitMb");
- this.ValidateProperty("MemoryLimitMb", value);
- this._memoryLimitMb = value;
- this.RaiseDataMemberChanged("MemoryLimitMb");
- this.OnMemoryLimitMbChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'TimeLimitSec' value.
- /// </summary>
- [DataMember()]
- [XmlAttribute(AttributeName="timeLimit")]
- public float TimeLimitSec
- {
- get
- {
- return this._timeLimitSec;
- }
- set
- {
- if ((this._timeLimitSec != value))
- {
- this.OnTimeLimitSecChanging(value);
- this.RaiseDataMemberChanging("TimeLimitSec");
- this.ValidateProperty("TimeLimitSec", value);
- this._timeLimitSec = value;
- this.RaiseDataMemberChanged("TimeLimitSec");
- this.OnTimeLimitSecChanged();
- }
- }
- }
- }
-
- /// <summary>
- /// The 'TestingInformation' class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
- public sealed partial class TestingInformation : ComplexObject
- {
-
- private TaskIOFile[] _ioFiles;
-
- private TestDescriptor[] _tests;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnIOFilesChanging(TaskIOFile[] value);
- partial void OnIOFilesChanged();
- partial void OnTestsChanging(TestDescriptor[] value);
- partial void OnTestsChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="TestingInformation"/> class.
- /// </summary>
- public TestingInformation()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the 'IOFiles' value.
- /// </summary>
- [DataMember()]
- [Display(AutoGenerateField=false)]
- [XmlArray(ElementName="files")]
- [XmlArrayItem(ElementName="file")]
- public TaskIOFile[] IOFiles
- {
- get
- {
- return this._ioFiles;
- }
- set
- {
- if ((this._ioFiles != value))
- {
- this.OnIOFilesChanging(value);
- this.RaiseDataMemberChanging("IOFiles");
- this.ValidateProperty("IOFiles", value);
- this._ioFiles = value;
- this.RaiseDataMemberChanged("IOFiles");
- this.OnIOFilesChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Tests' value.
- /// </summary>
- [DataMember()]
- [Display(AutoGenerateField=false)]
- [XmlArray(ElementName="tests")]
- [XmlArrayItem(ElementName="test")]
- public TestDescriptor[] Tests
- {
- get
- {
- return this._tests;
- }
- set
- {
- if ((this._tests != value))
- {
- this.OnTestsChanging(value);
- this.RaiseDataMemberChanging("Tests");
- this.ValidateProperty("Tests", value);
- this._tests = value;
- this.RaiseDataMemberChanged("Tests");
- this.OnTestsChanged();
- }
- }
- }
- }
-
- /// <summary>
- /// The 'TestingMachineEntity' entity class.
- /// </summary>
- [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
- public sealed partial class TestingMachineEntity : Entity
- {
-
- private string _name;
-
- private ServerStatus _status;
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
- partial void OnStatusChanging(ServerStatus value);
- partial void OnStatusChanged();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="TestingMachineEntity"/> class.
- /// </summary>
- public TestingMachineEntity()
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets or sets the 'Name' value.
- /// </summary>
- [DataMember()]
- [Editable(false, AllowInitialValue=true)]
- [Key()]
- [RoundtripOriginal()]
- public string Name
- {
- get
- {
- return this._name;
- }
- set
- {
- if ((this._name != value))
- {
- this.OnNameChanging(value);
- this.ValidateProperty("Name", value);
- this._name = value;
- this.RaisePropertyChanged("Name");
- this.OnNameChanged();
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the 'Status' value.
- /// </summary>
- [DataMember()]
- public ServerStatus Status
- {
- get
- {
- return this._status;
- }
- set
- {
- if ((this._status != value))
- {
- this.OnStatusChanging(value);
- this.RaiseDataMemberChanging("Status");
- this.ValidateProperty("Status", value);
- this._status = value;
- this.RaiseDataMemberChanged("Status");
- this.OnStatusChanged();
- }
- }
- }
-
- /// <summary>
- /// Computes a value from the key fields that uniquely identifies this entity instance.
- /// </summary>
- /// <returns>An object instance that uniquely identifies this entity instance.</returns>
- public override object GetIdentity()
- {
- return this._name;
- }
- }
- }
- namespace glados.Web.Services.RIAServices
- {
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using System.Linq;
- using System.ServiceModel;
- using System.ServiceModel.DomainServices;
- using System.ServiceModel.DomainServices.Client;
- using System.ServiceModel.DomainServices.Client.ApplicationServices;
- using glados.Web.Logic.Base;
- using glados.Web.Services.Entities;
-
-
- /// <summary>
- /// The DomainContext corresponding to the 'CompetitionAdminService' DomainService.
- /// </summary>
- public sealed partial class CompetitionAdminContext : DomainContext
- {
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="CompetitionAdminContext"/> class.
- /// </summary>
- public CompetitionAdminContext() :
- this(new WebDomainClient<ICompetitionAdminServiceContract>(new Uri("glados-Web-Services-RIAServices-CompetitionAdminService.svc", UriKind.Relative)))
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="CompetitionAdminContext"/> class with the specified service URI.
- /// </summary>
- /// <param name="serviceUri">The CompetitionAdminService service URI.</param>
- public CompetitionAdminContext(Uri serviceUri) :
- this(new WebDomainClient<ICompetitionAdminServiceContract>(serviceUri))
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="CompetitionAdminContext"/> class with the specified <paramref name="domainClient"/>.
- /// </summary>
- /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
- public CompetitionAdminContext(DomainClient domainClient) :
- base(domainClient)
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Asynchronously invokes the 'AssignTask' method of the DomainService.
- /// </summary>
- /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
- /// <param name="problemId">The value for the 'problemId' parameter of this action.</param>
- /// <param name="callback">Callback to invoke when the operation completes.</param>
- /// <param name="userState">Value to pass to the callback. It can be <c>null</c>.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation AssignTask(int assignmentId, int problemId, Action<InvokeOperation> callback, object userState)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("assignmentId", assignmentId);
- parameters.Add("problemId", problemId);
- this.ValidateMethod("AssignTask", parameters);
- return this.InvokeOperation("AssignTask", typeof(void), parameters, true, callback, userState);
- }
-
- /// <summary>
- /// Asynchronously invokes the 'AssignTask' method of the DomainService.
- /// </summary>
- /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
- /// <param name="problemId">The value for the 'problemId' parameter of this action.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation AssignTask(int assignmentId, int problemId)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("assignmentId", assignmentId);
- parameters.Add("problemId", problemId);
- this.ValidateMethod("AssignTask", parameters);
- return this.InvokeOperation("AssignTask", typeof(void), parameters, true, null, null);
- }
-
- /// <summary>
- /// Asynchronously invokes the 'CreateCompetition' method of the DomainService.
- /// </summary>
- /// <param name="name">The value for the 'name' parameter of this action.</param>
- /// <param name="typeName">The value for the 'typeName' parameter of this action.</param>
- /// <param name="callback">Callback to invoke when the operation completes.</param>
- /// <param name="userState">Value to pass to the callback. It can be <c>null</c>.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<int> CreateCompetition(string name, string typeName, Action<InvokeOperation<int>> callback, object userState)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("name", name);
- parameters.Add("typeName", typeName);
- this.ValidateMethod("CreateCompetition", parameters);
- return ((InvokeOperation<int>)(this.InvokeOperation("CreateCompetition", typeof(int), parameters, true, callback, userState)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'CreateCompetition' method of the DomainService.
- /// </summary>
- /// <param name="name">The value for the 'name' parameter of this action.</param>
- /// <param name="typeName">The value for the 'typeName' parameter of this action.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<int> CreateCompetition(string name, string typeName)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("name", name);
- parameters.Add("typeName", typeName);
- this.ValidateMethod("CreateCompetition", parameters);
- return ((InvokeOperation<int>)(this.InvokeOperation("CreateCompetition", typeof(int), parameters, true, null, null)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'DeleteCompetition' method of the DomainService.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <param name="callback">Callback to invoke when the operation completes.</param>
- /// <param name="userState">Value to pass to the callback. It can be <c>null</c>.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation DeleteCompetition(int id, Action<InvokeOperation> callback, object userState)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("id", id);
- this.ValidateMethod("DeleteCompetition", parameters);
- return this.InvokeOperation("DeleteCompetition", typeof(void), parameters, true, callback, userState);
- }
-
- /// <summary>
- /// Asynchronously invokes the 'DeleteCompetition' method of the DomainService.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation DeleteCompetition(int id)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("id", id);
- this.ValidateMethod("DeleteCompetition", parameters);
- return this.InvokeOperation("DeleteCompetition", typeof(void), parameters, true, null, null);
- }
-
- /// <summary>
- /// Asynchronously invokes the 'GetAssignmentsForCompetition' method of the DomainService.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <param name="callback">Callback to invoke when the operation completes.</param>
- /// <param name="userState">Value to pass to the callback. It can be <c>null</c>.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<IEnumerable<ParticipantAssignment>> GetAssignmentsForCompetition(int id, Action<InvokeOperation<IEnumerable<ParticipantAssignment>>> callback, object userState)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("id", id);
- this.ValidateMethod("GetAssignmentsForCompetition", parameters);
- return ((InvokeOperation<IEnumerable<ParticipantAssignment>>)(this.InvokeOperation("GetAssignmentsForCompetition", typeof(IEnumerable<ParticipantAssignment>), parameters, true, callback, userState)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'GetAssignmentsForCompetition' method of the DomainService.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<IEnumerable<ParticipantAssignment>> GetAssignmentsForCompetition(int id)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("id", id);
- this.ValidateMethod("GetAssignmentsForCompetition", parameters);
- return ((InvokeOperation<IEnumerable<ParticipantAssignment>>)(this.InvokeOperation("GetAssignmentsForCompetition", typeof(IEnumerable<ParticipantAssignment>), parameters, true, null, null)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'GetCompetitionMainPage' method of the DomainService.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <param name="callback">Callback to invoke when the operation completes.</param>
- /// <param name="userState">Value to pass to the callback. It can be <c>null</c>.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<Uri> GetCompetitionMainPage(int id, Action<InvokeOperation<Uri>> callback, object userState)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("id", id);
- this.ValidateMethod("GetCompetitionMainPage", parameters);
- return ((InvokeOperation<Uri>)(this.InvokeOperation("GetCompetitionMainPage", typeof(Uri), parameters, true, callback, userState)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'GetCompetitionMainPage' method of the DomainService.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<Uri> GetCompetitionMainPage(int id)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("id", id);
- this.ValidateMethod("GetCompetitionMainPage", parameters);
- return ((InvokeOperation<Uri>)(this.InvokeOperation("GetCompetitionMainPage", typeof(Uri), parameters, true, null, null)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'GetCompetitionTypeList' method of the DomainService.
- /// </summary>
- /// <param name="callback">Callback to invoke when the operation completes.</param>
- /// <param name="userState">Value to pass to the callback. It can be <c>null</c>.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<IEnumerable<string>> GetCompetitionTypeList(Action<InvokeOperation<IEnumerable<string>>> callback, object userState)
- {
- this.ValidateMethod("GetCompetitionTypeList", null);
- return ((InvokeOperation<IEnumerable<string>>)(this.InvokeOperation("GetCompetitionTypeList", typeof(IEnumerable<string>), null, true, callback, userState)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'GetCompetitionTypeList' method of the DomainService.
- /// </summary>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<IEnumerable<string>> GetCompetitionTypeList()
- {
- this.ValidateMethod("GetCompetitionTypeList", null);
- return ((InvokeOperation<IEnumerable<string>>)(this.InvokeOperation("GetCompetitionTypeList", typeof(IEnumerable<string>), null, true, null, null)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'GetCourseParticipantStates' method of the DomainService.
- /// </summary>
- /// <param name="competitionId">The value for the 'competitionId' parameter of this action.</param>
- /// <param name="callback">Callback to invoke when the operation completes.</param>
- /// <param name="userState">Value to pass to the callback. It can be <c>null</c>.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<CourseDashboardInfo> GetCourseParticipantStates(int competitionId, Action<InvokeOperation<CourseDashboardInfo>> callback, object userState)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("competitionId", competitionId);
- this.ValidateMethod("GetCourseParticipantStates", parameters);
- return ((InvokeOperation<CourseDashboardInfo>)(this.InvokeOperation("GetCourseParticipantStates", typeof(CourseDashboardInfo), parameters, true, callback, userState)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'GetCourseParticipantStates' method of the DomainService.
- /// </summary>
- /// <param name="competitionId">The value for the 'competitionId' parameter of this action.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<CourseDashboardInfo> GetCourseParticipantStates(int competitionId)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("competitionId", competitionId);
- this.ValidateMethod("GetCourseParticipantStates", parameters);
- return ((InvokeOperation<CourseDashboardInfo>)(this.InvokeOperation("GetCourseParticipantStates", typeof(CourseDashboardInfo), parameters, true, null, null)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'SetAssignmentsForCompetition' method of the DomainService.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <param name="assignments">The value for the 'assignments' parameter of this action.</param>
- /// <param name="callback">Callback to invoke when the operation completes.</param>
- /// <param name="userState">Value to pass to the callback. It can be <c>null</c>.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation SetAssignmentsForCompetition(int id, IEnumerable<ParticipantAssignment> assignments, Action<InvokeOperation> callback, object userState)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("id", id);
- parameters.Add("assignments", assignments);
- this.ValidateMethod("SetAssignmentsForCompetition", parameters);
- return this.InvokeOperation("SetAssignmentsForCompetition", typeof(void), parameters, true, callback, userState);
- }
-
- /// <summary>
- /// Asynchronously invokes the 'SetAssignmentsForCompetition' method of the DomainService.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <param name="assignments">The value for the 'assignments' parameter of this action.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation SetAssignmentsForCompetition(int id, IEnumerable<ParticipantAssignment> assignments)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("id", id);
- parameters.Add("assignments", assignments);
- this.ValidateMethod("SetAssignmentsForCompetition", parameters);
- return this.InvokeOperation("SetAssignmentsForCompetition", typeof(void), parameters, true, null, null);
- }
-
- /// <summary>
- /// Creates a new EntityContainer for this DomainContext's EntitySets.
- /// </summary>
- /// <returns>A new container instance.</returns>
- protected override EntityContainer CreateEntityContainer()
- {
- return new CompetitionAdminContextEntityContainer();
- }
-
- /// <summary>
- /// Service contract for the 'CompetitionAdminService' DomainService.
- /// </summary>
- [ServiceContract()]
- public interface ICompetitionAdminServiceContract
- {
-
- /// <summary>
- /// Asynchronously invokes the 'AssignTask' operation.
- /// </summary>
- /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
- /// <param name="problemId">The value for the 'problemId' parameter of this action.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/AssignTaskDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/AssignTask", ReplyAction="http://tempuri.org/CompetitionAdminService/AssignTaskResponse")]
- IAsyncResult BeginAssignTask(int assignmentId, int problemId, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginAssignTask'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginAssignTask'.</param>
- void EndAssignTask(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'CreateCompetition' operation.
- /// </summary>
- /// <param name="name">The value for the 'name' parameter of this action.</param>
- /// <param name="typeName">The value for the 'typeName' parameter of this action.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/CreateCompetitionDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/CreateCompetition", ReplyAction="http://tempuri.org/CompetitionAdminService/CreateCompetitionResponse")]
- IAsyncResult BeginCreateCompetition(string name, string typeName, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginCreateCompetition'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginCreateCompetition'.</param>
- /// <returns>The 'Int32' returned from the 'CreateCompetition' operation.</returns>
- int EndCreateCompetition(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'DeleteCompetition' operation.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/DeleteCompetitionDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/DeleteCompetition", ReplyAction="http://tempuri.org/CompetitionAdminService/DeleteCompetitionResponse")]
- IAsyncResult BeginDeleteCompetition(int id, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginDeleteCompetition'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginDeleteCompetition'.</param>
- void EndDeleteCompetition(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetAssignmentsForCompetition' operation.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/GetAssignmentsForCompetitionDomainServ" +
- "iceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/GetAssignmentsForCompetition", ReplyAction="http://tempuri.org/CompetitionAdminService/GetAssignmentsForCompetitionResponse")]
- IAsyncResult BeginGetAssignmentsForCompetition(int id, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetAssignmentsForCompetition'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetAssignmentsForCompetition'.</param>
- /// <returns>The 'IEnumerable`1' returned from the 'GetAssignmentsForCompetition' operation.</returns>
- IEnumerable<ParticipantAssignment> EndGetAssignmentsForCompetition(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetCompetitionMainPage' operation.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/GetCompetitionMainPageDomainServiceFau" +
- "lt", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/GetCompetitionMainPage", ReplyAction="http://tempuri.org/CompetitionAdminService/GetCompetitionMainPageResponse")]
- IAsyncResult BeginGetCompetitionMainPage(int id, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetCompetitionMainPage'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetCompetitionMainPage'.</param>
- /// <returns>The 'Uri' returned from the 'GetCompetitionMainPage' operation.</returns>
- Uri EndGetCompetitionMainPage(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetCompetitionTypeList' operation.
- /// </summary>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/GetCompetitionTypeListDomainServiceFau" +
- "lt", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/GetCompetitionTypeList", ReplyAction="http://tempuri.org/CompetitionAdminService/GetCompetitionTypeListResponse")]
- IAsyncResult BeginGetCompetitionTypeList(AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetCompetitionTypeList'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetCompetitionTypeList'.</param>
- /// <returns>The 'IEnumerable`1' returned from the 'GetCompetitionTypeList' operation.</returns>
- IEnumerable<string> EndGetCompetitionTypeList(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetCourseParticipantStates' operation.
- /// </summary>
- /// <param name="competitionId">The value for the 'competitionId' parameter of this action.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/GetCourseParticipantStatesDomainServic" +
- "eFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/GetCourseParticipantStates", ReplyAction="http://tempuri.org/CompetitionAdminService/GetCourseParticipantStatesResponse")]
- IAsyncResult BeginGetCourseParticipantStates(int competitionId, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetCourseParticipantStates'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetCourseParticipantStates'.</param>
- /// <returns>The 'CourseDashboardInfo' returned from the 'GetCourseParticipantStates' operation.</returns>
- CourseDashboardInfo EndGetCourseParticipantStates(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'SetAssignmentsForCompetition' operation.
- /// </summary>
- /// <param name="id">The value for the 'id' parameter of this action.</param>
- /// <param name="assignments">The value for the 'assignments' parameter of this action.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/SetAssignmentsForCompetitionDomainServ" +
- "iceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/SetAssignmentsForCompetition", ReplyAction="http://tempuri.org/CompetitionAdminService/SetAssignmentsForCompetitionResponse")]
- IAsyncResult BeginSetAssignmentsForCompetition(int id, IEnumerable<ParticipantAssignment> assignments, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginSetAssignmentsForCompetition'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginSetAssignmentsForCompetition'.</param>
- void EndSetAssignmentsForCompetition(IAsyncResult result);
- }
-
- internal sealed class CompetitionAdminContextEntityContainer : EntityContainer
- {
-
- public CompetitionAdminContextEntityContainer()
- {
- }
- }
- }
-
- /// <summary>
- /// The DomainContext corresponding to the 'ParticipationService' DomainService.
- /// </summary>
- public sealed partial class ParticipationContext : DomainContext
- {
-
- #region Extensibility Method Definitions
-
- /// <summary>
- /// This method is invoked from the constructor once initialization is complete and
- /// can be used for further object setup.
- /// </summary>
- partial void OnCreated();
-
- #endregion
-
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ParticipationContext"/> class.
- /// </summary>
- public ParticipationContext() :
- this(new WebDomainClient<IParticipationServiceContract>(new Uri("glados-Web-Services-RIAServices-ParticipationService.svc", UriKind.Relative)))
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ParticipationContext"/> class with the specified service URI.
- /// </summary>
- /// <param name="serviceUri">The ParticipationService service URI.</param>
- public ParticipationContext(Uri serviceUri) :
- this(new WebDomainClient<IParticipationServiceContract>(serviceUri))
- {
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ParticipationContext"/> class with the specified <paramref name="domainClient"/>.
- /// </summary>
- /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
- public ParticipationContext(DomainClient domainClient) :
- base(domainClient)
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Asynchronously invokes the 'GetParticipantsForCompetition' method of the DomainService.
- /// </summary>
- /// <param name="competitionId">The value for the 'competitionId' parameter of this action.</param>
- /// <param name="callback">Callback to invoke when the operation completes.</param>
- /// <param name="userState">Value to pass to the callback. It can be <c>null</c>.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<IEnumerable<ParticipantState>> GetParticipantsForCompetition(int competitionId, Action<InvokeOperation<IEnumerable<ParticipantState>>> callback, object userState)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("competitionId", competitionId);
- this.ValidateMethod("GetParticipantsForCompetition", parameters);
- return ((InvokeOperation<IEnumerable<ParticipantState>>)(this.InvokeOperation("GetParticipantsForCompetition", typeof(IEnumerable<ParticipantState>), parameters, true, callback, userState)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'GetParticipantsForCompetition' method of the DomainService.
- /// </summary>
- /// <param name="competitionId">The value for the 'competitionId' parameter of this action.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<IEnumerable<ParticipantState>> GetParticipantsForCompetition(int competitionId)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("competitionId", competitionId);
- this.ValidateMethod("GetParticipantsForCompetition", parameters);
- return ((InvokeOperation<IEnumerable<ParticipantState>>)(this.InvokeOperation("GetParticipantsForCompetition", typeof(IEnumerable<ParticipantState>), parameters, true, null, null)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'GetProblemByAssignmentId' method of the DomainService.
- /// </summary>
- /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
- /// <param name="callback">Callback to invoke when the operation completes.</param>
- /// <param name="userState">Value to pass to the callback. It can be <c>null</c>.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<ProblemDetails> GetProblemByAssignmentId(int assignmentId, Action<InvokeOperation<ProblemDetails>> callback, object userState)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("assignmentId", assignmentId);
- this.ValidateMethod("GetProblemByAssignmentId", parameters);
- return ((InvokeOperation<ProblemDetails>)(this.InvokeOperation("GetProblemByAssignmentId", typeof(ProblemDetails), parameters, true, callback, userState)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'GetProblemByAssignmentId' method of the DomainService.
- /// </summary>
- /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<ProblemDetails> GetProblemByAssignmentId(int assignmentId)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("assignmentId", assignmentId);
- this.ValidateMethod("GetProblemByAssignmentId", parameters);
- return ((InvokeOperation<ProblemDetails>)(this.InvokeOperation("GetProblemByAssignmentId", typeof(ProblemDetails), parameters, true, null, null)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'GetProblemDetails' method of the DomainService.
- /// </summary>
- /// <param name="problemId">The value for the 'problemId' parameter of this action.</param>
- /// <param name="callback">Callback to invoke when the operation completes.</param>
- /// <param name="userState">Value to pass to the callback. It can be <c>null</c>.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<ProblemDetails> GetProblemDetails(int problemId, Action<InvokeOperation<ProblemDetails>> callback, object userState)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("problemId", problemId);
- this.ValidateMethod("GetProblemDetails", parameters);
- return ((InvokeOperation<ProblemDetails>)(this.InvokeOperation("GetProblemDetails", typeof(ProblemDetails), parameters, true, callback, userState)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'GetProblemDetails' method of the DomainService.
- /// </summary>
- /// <param name="problemId">The value for the 'problemId' parameter of this action.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<ProblemDetails> GetProblemDetails(int problemId)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("problemId", problemId);
- this.ValidateMethod("GetProblemDetails", parameters);
- return ((InvokeOperation<ProblemDetails>)(this.InvokeOperation("GetProblemDetails", typeof(ProblemDetails), parameters, true, null, null)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'SubmitSolution' method of the DomainService.
- /// </summary>
- /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
- /// <param name="compilerName">The value for the 'compilerName' parameter of this action.</param>
- /// <param name="source">The value for the 'source' parameter of this action.</param>
- /// <param name="callback">Callback to invoke when the operation completes.</param>
- /// <param name="userState">Value to pass to the callback. It can be <c>null</c>.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<int> SubmitSolution(int assignmentId, string compilerName, byte[] source, Action<InvokeOperation<int>> callback, object userState)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("assignmentId", assignmentId);
- parameters.Add("compilerName", compilerName);
- parameters.Add("source", source);
- this.ValidateMethod("SubmitSolution", parameters);
- return ((InvokeOperation<int>)(this.InvokeOperation("SubmitSolution", typeof(int), parameters, true, callback, userState)));
- }
-
- /// <summary>
- /// Asynchronously invokes the 'SubmitSolution' method of the DomainService.
- /// </summary>
- /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
- /// <param name="compilerName">The value for the 'compilerName' parameter of this action.</param>
- /// <param name="source">The value for the 'source' parameter of this action.</param>
- /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
- public InvokeOperation<int> SubmitSolution(int assignmentId, string compilerName, byte[] source)
- {
- Dictionary<string, object> parameters = new Dictionary<string, object>();
- parameters.Add("assignmentId", assignmentId);
- parameters.Add("compilerName", compilerName);
- parameters.Add("source", source);
- this.ValidateMethod("SubmitSolution", parameters);
- return ((InvokeOperation<int>)(this.InvokeOperation("SubmitSolution", typeof(int), parameters, true, null, null)));
- }
-
- /// <summary>
- /// Creates a new EntityContainer for this DomainContext's EntitySets.
- /// </summary>
- /// <returns>A new container instance.</returns>
- protected override EntityContainer CreateEntityContainer()
- {
- return new ParticipationContextEntityContainer();
- }
-
- /// <summary>
- /// Service contract for the 'ParticipationService' DomainService.
- /// </summary>
- [ServiceContract()]
- public interface IParticipationServiceContract
- {
-
- /// <summary>
- /// Asynchronously invokes the 'GetParticipantsForCompetition' operation.
- /// </summary>
- /// <param name="competitionId">The value for the 'competitionId' parameter of this action.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ParticipationService/GetParticipantsForCompetitionDomainServic" +
- "eFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ParticipationService/GetParticipantsForCompetition", ReplyAction="http://tempuri.org/ParticipationService/GetParticipantsForCompetitionResponse")]
- IAsyncResult BeginGetParticipantsForCompetition(int competitionId, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetParticipantsForCompetition'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetParticipantsForCompetition'.</param>
- /// <returns>The 'IEnumerable`1' returned from the 'GetParticipantsForCompetition' operation.</returns>
- IEnumerable<ParticipantState> EndGetParticipantsForCompetition(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetProblemByAssignmentId' operation.
- /// </summary>
- /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ParticipationService/GetProblemByAssignmentIdDomainServiceFaul" +
- "t", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ParticipationService/GetProblemByAssignmentId", ReplyAction="http://tempuri.org/ParticipationService/GetProblemByAssignmentIdResponse")]
- IAsyncResult BeginGetProblemByAssignmentId(int assignmentId, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetProblemByAssignmentId'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetProblemByAssignmentId'.</param>
- /// <returns>The 'ProblemDetails' returned from the 'GetProblemByAssignmentId' operation.</returns>
- ProblemDetails EndGetProblemByAssignmentId(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'GetProblemDetails' operation.
- /// </summary>
- /// <param name="problemId">The value for the 'problemId' parameter of this action.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ParticipationService/GetProblemDetailsDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ParticipationService/GetProblemDetails", ReplyAction="http://tempuri.org/ParticipationService/GetProblemDetailsResponse")]
- IAsyncResult BeginGetProblemDetails(int problemId, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginGetProblemDetails'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginGetProblemDetails'.</param>
- /// <returns>The 'ProblemDetails' returned from the 'GetProblemDetails' operation.</returns>
- ProblemDetails EndGetProblemDetails(IAsyncResult result);
-
- /// <summary>
- /// Asynchronously invokes the 'SubmitSolution' operation.
- /// </summary>
- /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
- /// <param name="compilerName">The value for the 'compilerName' parameter of this action.</param>
- /// <param name="source">The value for the 'source' parameter of this action.</param>
- /// <param name="callback">Callback to invoke on completion.</param>
- /// <param name="asyncState">Optional state object.</param>
- /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
- [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ParticipationService/SubmitSolutionDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ParticipationService/SubmitSolution", ReplyAction="http://tempuri.org/ParticipationService/SubmitSolutionResponse")]
- IAsyncResult BeginSubmitSolution(int assignmentId, string compilerName, byte[] source, AsyncCallback callback, object asyncState);
-
- /// <summary>
- /// Completes the asynchronous operation begun by 'BeginSubmitSolution'.
- /// </summary>
- /// <param name="result">The IAsyncResult returned from 'BeginSubmitSolution'.</param>
- /// <returns>The 'Int32' returned from the 'SubmitSolution' operation.</returns>
- int EndSubmitSolution(IAsyncResult result);
- }
-
- internal sealed class ParticipationContextEntityContainer : EntityContainer
- {
-
- public ParticipationContextEntityContainer()
- {
- }
- }
- }
- }