/glados_proto/glados_proto/Generated_Code/glados.Web.g.cs-82f061dc
Unknown | 2851 lines | 2543 code | 308 blank | 0 comment | 0 complexity | baaf8a2f180c6eef30fcdbc5523fbd59 MD5 | raw file
- //------------------------------------------------------------------------------
- // <auto-generated>
- // This code was generated by a tool.
- // Runtime Version:4.0.30319.431
- //
- // 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 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();
-
- #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 the collection of associated <see cref="Submission"/> entities.
- /// </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 domain context corresponding to the 'AuthenticationDomainService' domain service.
- /// </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 domain context.</param>
- public AuthenticationDomainContext(DomainClient domainClient) :
- base(domainClient)
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets the set of <see cref="AuthUser"/> entities 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"/> entities using the 'GetUser' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="AuthUser"/> entities.</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"/> entities 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"/> entities.</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"/> entities using the 'Logout' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="AuthUser"/> entities.</returns>
- public EntityQuery<AuthUser> LogoutQuery()
- {
- this.ValidateMethod("LogoutQuery", null);
- return base.CreateQuery<AuthUser>("Logout", null, true, false);
- }
-
- /// <summary>
- /// Creates a new entity container for this domain context's entity sets.
- /// </summary>
- /// <returns>A new container instance.</returns>
- protected override EntityContainer CreateEntityContainer()
- {
- return new AuthenticationDomainContextEntityContainer();
- }
-
- /// <summary>
- /// Service contract for the 'AuthenticationDomainService' domain service.
- /// </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;
-
- #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="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"/> entities.
- /// </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;
- }
- }
-
- 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"/> entities.
- /// </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 '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 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 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"/> entities.
- /// </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 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;
-
- #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"/> entities.
- /// </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();
- }
- }
- }
-
- 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);
- }
-
- /// <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 _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 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 '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"/> entities.
- /// </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"/> entities.
- /// </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.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 domain context corresponding to the 'StatusService' domain service.
- /// </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 domain context.</param>
- public StatusContext(DomainClient domainClient) :
- base(domainClient)
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets the set of <see cref="TestingMachineEntity"/> entities 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"/> entities using the 'GetTesterStatus' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="TestingMachineEntity"/> entities.</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 domain service.
- /// </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 domain service.
- /// </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 domain service.
- /// </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 domain service.
- /// </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 entity container for this domain context's entity sets.
- /// </summary>
- /// <returns>A new container instance.</returns>
- protected override EntityContainer CreateEntityContainer()
- {
- return new StatusContextEntityContainer();
- }
-
- /// <summary>
- /// Service contract for the 'StatusService' domain service.
- /// </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);
-
- /// <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/StatusService/SubmitChangesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
- [OperationContract(AsyncPattern=true, Action="http://tempuri.org/StatusService/SubmitChanges", ReplyAction="http://tempuri.org/StatusService/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 StatusContextEntityContainer : EntityContainer
- {
-
- public StatusContextEntityContainer()
- {
- this.CreateEntitySet<TestingMachineEntity>(EntitySetOperations.None);
- }
- }
- }
-
- /// <summary>
- /// The domain context corresponding to the 'TaskStructureService' domain service.
- /// </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 domain context.</param>
- public TaskStructureContext(DomainClient domainClient) :
- base(domainClient)
- {
- this.OnCreated();
- }
-
- /// <summary>
- /// Gets the set of <see cref="Assignment"/> entities 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"/> entities 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"/> entities 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"/> entities 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"/> entities 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="Problem"/> entities 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"/> entities 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"/> entities 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"/> entities using the 'GetAssignmentSet' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Assignment"/> entities.</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"/> entities using the 'GetAssignmentsForMe' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Assignment"/> entities.</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"/> entities using the 'GetCourseSet' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Course"/> entities.</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"/> entities using the 'GetGroupSet' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Group"/> entities.</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"/> entities using the 'GetMembershipSet' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Membership"/> entities.</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"/> entities using the 'GetParticipationSet' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Participation"/> entities.</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="Problem"/> entities using the 'GetProblemSet' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Problem"/> entities.</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="Submission"/> entities using the 'GetSubmissionSet' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Submission"/> entities.</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"/> entities using the 'GetUsers' query.
- /// </summary>
- /// <returns>An EntityQuery that can be loaded to retrieve <see cref="User"/> entities.</returns>
- public EntityQuery<User> GetUsersQuery()
- {
- this.ValidateMethod("GetUsersQuery", null);
- return base.CreateQuery<User>("GetUsers", null, false, true);
- }
-
- /// <summary>
- /// Creates a new entity container for this domain context's entity sets.
- /// </summary>
- /// <returns>A new container instance.</returns>
- protected override EntityContainer CreateEntityContainer()
- {
- return new TaskStructureContextEntityContainer();
- }
-
- /// <summary>
- /// Service contract for the 'TaskStructureService' domain service.
- /// </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 '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 '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<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 Glados.TestingModule.Interfaces;
-
-
- /// <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;
- }
- }
- }