/glados_proto/glados_proto/Generated_Code/glados.Web.g.cs
C# | 5490 lines | 3474 code | 581 blank | 1435 comment | 263 complexity | cab37df988f6307caed2a42a087b87be MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- //------------------------------------------------------------------------------
- // <auto-generated>
- // This code was generated by a tool.
- // Runtime Version:4.0.30319.1
- //
- // Changes to this file may cause incorrect behavior and will be lost if
- // the code is regenerated.
- // </auto-generated>
- //------------------------------------------------------------------------------
-
- 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>
- …
Large files files are truncated, but you can click here to view the full file