PageRenderTime 39ms CodeModel.GetById 5ms app.highlight 18ms RepoModel.GetById 2ms app.codeStats 0ms

/glados_proto/glados_proto/Generated_Code/glados.Web.g.cs-ad8f3be3

https://bitbucket.org/s_vladimir/tsys
Unknown | 4288 lines | 3835 code | 453 blank | 0 comment | 0 complexity | dad4f27d9ecc35f07cb06d789609b7c5 MD5 | raw file
   1//------------------------------------------------------------------------------
   2// <auto-generated>
   3//     This code was generated by a tool.
   4//     Runtime Version:4.0.30319.431
   5//
   6//     Changes to this file may cause incorrect behavior and will be lost if
   7//     the code is regenerated.
   8// </auto-generated>
   9//------------------------------------------------------------------------------
  10
  11namespace glados
  12{
  13    using System;
  14    using System.Collections.Generic;
  15    using System.ComponentModel;
  16    using System.ComponentModel.DataAnnotations;
  17    using System.Linq;
  18    using System.ServiceModel.DomainServices;
  19    using System.ServiceModel.DomainServices.Client;
  20    using System.ServiceModel.DomainServices.Client.ApplicationServices;
  21    using glados.Web;
  22    
  23    
  24    /// <summary>
  25    /// Context for the RIA application.
  26    /// </summary>
  27    /// <remarks>
  28    /// This context extends the base to make application services and types available
  29    /// for consumption from code and xaml.
  30    /// </remarks>
  31    public sealed partial class WebContext : WebContextBase
  32    {
  33        
  34        #region Extensibility Method Definitions
  35
  36        /// <summary>
  37        /// This method is invoked from the constructor once initialization is complete and
  38        /// can be used for further object setup.
  39        /// </summary>
  40        partial void OnCreated();
  41
  42        #endregion
  43        
  44        
  45        /// <summary>
  46        /// Initializes a new instance of the WebContext class.
  47        /// </summary>
  48        public WebContext()
  49        {
  50            this.OnCreated();
  51        }
  52        
  53        /// <summary>
  54        /// Gets the context that is registered as a lifetime object with the current application.
  55        /// </summary>
  56        /// <exception cref="InvalidOperationException"> is thrown if there is no current application,
  57        /// no contexts have been added, or more than one context has been added.
  58        /// </exception>
  59        /// <seealso cref="System.Windows.Application.ApplicationLifetimeObjects"/>
  60        public new static WebContext Current
  61        {
  62            get
  63            {
  64                return ((WebContext)(WebContextBase.Current));
  65            }
  66        }
  67        
  68        /// <summary>
  69        /// Gets a user representing the authenticated identity.
  70        /// </summary>
  71        public new AuthUser User
  72        {
  73            get
  74            {
  75                return ((AuthUser)(base.User));
  76            }
  77        }
  78    }
  79}
  80namespace Glados.TestingModule.Interfaces
  81{
  82    using System;
  83    using System.Collections.Generic;
  84    using System.ComponentModel;
  85    using System.ComponentModel.DataAnnotations;
  86    using System.Linq;
  87    using System.ServiceModel.DomainServices;
  88    using System.ServiceModel.DomainServices.Client;
  89    using System.ServiceModel.DomainServices.Client.ApplicationServices;
  90    
  91    
  92    public enum ServerStatus
  93    {
  94        
  95        Idle = 0,
  96        
  97        Busy = 1,
  98        
  99        InternalError = 2,
 100        
 101        Unavailable = 3,
 102        
 103        Down = 4,
 104    }
 105}
 106namespace glados.Web
 107{
 108    using System;
 109    using System.Collections.Generic;
 110    using System.ComponentModel;
 111    using System.ComponentModel.DataAnnotations;
 112    using System.Linq;
 113    using System.Runtime.Serialization;
 114    using System.ServiceModel;
 115    using System.ServiceModel.DomainServices;
 116    using System.ServiceModel.DomainServices.Client;
 117    using System.ServiceModel.DomainServices.Client.ApplicationServices;
 118    using System.ServiceModel.Web;
 119    using System.Xml.Serialization;
 120    
 121    
 122    /// <summary>
 123    /// The 'Assignment' entity class.
 124    /// </summary>
 125    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
 126    public sealed partial class Assignment : Entity
 127    {
 128        
 129        private int _id;
 130        
 131        private EntityRef<Participation> _participation;
 132        
 133        private int _participationId;
 134        
 135        private EntityRef<Problem> _problem;
 136        
 137        private int _problemId;
 138        
 139        private byte[] _state;
 140        
 141        private EntityCollection<Submission> _submission;
 142        
 143        #region Extensibility Method Definitions
 144
 145        /// <summary>
 146        /// This method is invoked from the constructor once initialization is complete and
 147        /// can be used for further object setup.
 148        /// </summary>
 149        partial void OnCreated();
 150        partial void OnIdChanging(int value);
 151        partial void OnIdChanged();
 152        partial void OnParticipationIdChanging(int value);
 153        partial void OnParticipationIdChanged();
 154        partial void OnProblemIdChanging(int value);
 155        partial void OnProblemIdChanged();
 156        partial void OnStateChanging(byte[] value);
 157        partial void OnStateChanged();
 158
 159        #endregion
 160        
 161        
 162        /// <summary>
 163        /// Initializes a new instance of the <see cref="Assignment"/> class.
 164        /// </summary>
 165        public Assignment()
 166        {
 167            this.OnCreated();
 168        }
 169        
 170        /// <summary>
 171        /// Gets or sets the 'Id' value.
 172        /// </summary>
 173        [DataMember()]
 174        [Editable(false, AllowInitialValue=true)]
 175        [Key()]
 176        [RoundtripOriginal()]
 177        public int Id
 178        {
 179            get
 180            {
 181                return this._id;
 182            }
 183            set
 184            {
 185                if ((this._id != value))
 186                {
 187                    this.OnIdChanging(value);
 188                    this.ValidateProperty("Id", value);
 189                    this._id = value;
 190                    this.RaisePropertyChanged("Id");
 191                    this.OnIdChanged();
 192                }
 193            }
 194        }
 195        
 196        /// <summary>
 197        /// Gets or sets the associated <see cref="Participation"/> entity.
 198        /// </summary>
 199        [Association("Participation_Assignment", "ParticipationId", "Id", IsForeignKey=true)]
 200        [XmlIgnore()]
 201        public Participation Participation
 202        {
 203            get
 204            {
 205                if ((this._participation == null))
 206                {
 207                    this._participation = new EntityRef<Participation>(this, "Participation", this.FilterParticipation);
 208                }
 209                return this._participation.Entity;
 210            }
 211            set
 212            {
 213                Participation previous = this.Participation;
 214                if ((previous != value))
 215                {
 216                    this.ValidateProperty("Participation", value);
 217                    if ((previous != null))
 218                    {
 219                        this._participation.Entity = null;
 220                        previous.Assignment.Remove(this);
 221                    }
 222                    if ((value != null))
 223                    {
 224                        this.ParticipationId = value.Id;
 225                    }
 226                    else
 227                    {
 228                        this.ParticipationId = default(int);
 229                    }
 230                    this._participation.Entity = value;
 231                    if ((value != null))
 232                    {
 233                        value.Assignment.Add(this);
 234                    }
 235                    this.RaisePropertyChanged("Participation");
 236                }
 237            }
 238        }
 239        
 240        /// <summary>
 241        /// Gets or sets the 'ParticipationId' value.
 242        /// </summary>
 243        [DataMember()]
 244        [RoundtripOriginal()]
 245        public int ParticipationId
 246        {
 247            get
 248            {
 249                return this._participationId;
 250            }
 251            set
 252            {
 253                if ((this._participationId != value))
 254                {
 255                    this.OnParticipationIdChanging(value);
 256                    this.RaiseDataMemberChanging("ParticipationId");
 257                    this.ValidateProperty("ParticipationId", value);
 258                    this._participationId = value;
 259                    this.RaiseDataMemberChanged("ParticipationId");
 260                    this.OnParticipationIdChanged();
 261                }
 262            }
 263        }
 264        
 265        /// <summary>
 266        /// Gets or sets the associated <see cref="Problem"/> entity.
 267        /// </summary>
 268        [Association("Problem_Assignment", "ProblemId", "Id", IsForeignKey=true)]
 269        [XmlIgnore()]
 270        public Problem Problem
 271        {
 272            get
 273            {
 274                if ((this._problem == null))
 275                {
 276                    this._problem = new EntityRef<Problem>(this, "Problem", this.FilterProblem);
 277                }
 278                return this._problem.Entity;
 279            }
 280            set
 281            {
 282                Problem previous = this.Problem;
 283                if ((previous != value))
 284                {
 285                    this.ValidateProperty("Problem", value);
 286                    if ((previous != null))
 287                    {
 288                        this._problem.Entity = null;
 289                        previous.Assignment.Remove(this);
 290                    }
 291                    if ((value != null))
 292                    {
 293                        this.ProblemId = value.Id;
 294                    }
 295                    else
 296                    {
 297                        this.ProblemId = default(int);
 298                    }
 299                    this._problem.Entity = value;
 300                    if ((value != null))
 301                    {
 302                        value.Assignment.Add(this);
 303                    }
 304                    this.RaisePropertyChanged("Problem");
 305                }
 306            }
 307        }
 308        
 309        /// <summary>
 310        /// Gets or sets the 'ProblemId' value.
 311        /// </summary>
 312        [DataMember()]
 313        [RoundtripOriginal()]
 314        public int ProblemId
 315        {
 316            get
 317            {
 318                return this._problemId;
 319            }
 320            set
 321            {
 322                if ((this._problemId != value))
 323                {
 324                    this.OnProblemIdChanging(value);
 325                    this.RaiseDataMemberChanging("ProblemId");
 326                    this.ValidateProperty("ProblemId", value);
 327                    this._problemId = value;
 328                    this.RaiseDataMemberChanged("ProblemId");
 329                    this.OnProblemIdChanged();
 330                }
 331            }
 332        }
 333        
 334        /// <summary>
 335        /// Gets or sets the 'State' value.
 336        /// </summary>
 337        [DataMember()]
 338        public byte[] State
 339        {
 340            get
 341            {
 342                return this._state;
 343            }
 344            set
 345            {
 346                if ((this._state != value))
 347                {
 348                    this.OnStateChanging(value);
 349                    this.RaiseDataMemberChanging("State");
 350                    this.ValidateProperty("State", value);
 351                    this._state = value;
 352                    this.RaiseDataMemberChanged("State");
 353                    this.OnStateChanged();
 354                }
 355            }
 356        }
 357        
 358        /// <summary>
 359        /// Gets the collection of associated <see cref="Submission"/> entity instances.
 360        /// </summary>
 361        [Association("Assignment_Submission", "Id", "AssignmentId")]
 362        [XmlIgnore()]
 363        public EntityCollection<Submission> Submission
 364        {
 365            get
 366            {
 367                if ((this._submission == null))
 368                {
 369                    this._submission = new EntityCollection<Submission>(this, "Submission", this.FilterSubmission, this.AttachSubmission, this.DetachSubmission);
 370                }
 371                return this._submission;
 372            }
 373        }
 374        
 375        private bool FilterParticipation(Participation entity)
 376        {
 377            return (entity.Id == this.ParticipationId);
 378        }
 379        
 380        private bool FilterProblem(Problem entity)
 381        {
 382            return (entity.Id == this.ProblemId);
 383        }
 384        
 385        private void AttachSubmission(Submission entity)
 386        {
 387            entity.Assignment = this;
 388        }
 389        
 390        private void DetachSubmission(Submission entity)
 391        {
 392            entity.Assignment = null;
 393        }
 394        
 395        private bool FilterSubmission(Submission entity)
 396        {
 397            return (entity.AssignmentId == this.Id);
 398        }
 399        
 400        /// <summary>
 401        /// Computes a value from the key fields that uniquely identifies this entity instance.
 402        /// </summary>
 403        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
 404        public override object GetIdentity()
 405        {
 406            return this._id;
 407        }
 408    }
 409    
 410    /// <summary>
 411    /// The DomainContext corresponding to the 'AuthenticationDomainService' DomainService.
 412    /// </summary>
 413    public sealed partial class AuthenticationDomainContext : global::System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationDomainContextBase
 414    {
 415        
 416        #region Extensibility Method Definitions
 417
 418        /// <summary>
 419        /// This method is invoked from the constructor once initialization is complete and
 420        /// can be used for further object setup.
 421        /// </summary>
 422        partial void OnCreated();
 423
 424        #endregion
 425        
 426        
 427        /// <summary>
 428        /// Initializes a new instance of the <see cref="AuthenticationDomainContext"/> class.
 429        /// </summary>
 430        public AuthenticationDomainContext() : 
 431                this(new WebDomainClient<IAuthenticationDomainServiceContract>(new Uri("glados-Web-AuthenticationDomainService.svc", UriKind.Relative)))
 432        {
 433        }
 434        
 435        /// <summary>
 436        /// Initializes a new instance of the <see cref="AuthenticationDomainContext"/> class with the specified service URI.
 437        /// </summary>
 438        /// <param name="serviceUri">The AuthenticationDomainService service URI.</param>
 439        public AuthenticationDomainContext(Uri serviceUri) : 
 440                this(new WebDomainClient<IAuthenticationDomainServiceContract>(serviceUri))
 441        {
 442        }
 443        
 444        /// <summary>
 445        /// Initializes a new instance of the <see cref="AuthenticationDomainContext"/> class with the specified <paramref name="domainClient"/>.
 446        /// </summary>
 447        /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 448        public AuthenticationDomainContext(DomainClient domainClient) : 
 449                base(domainClient)
 450        {
 451            this.OnCreated();
 452        }
 453        
 454        /// <summary>
 455        /// Gets the set of <see cref="AuthUser"/> entity instances that have been loaded into this <see cref="AuthenticationDomainContext"/> instance.
 456        /// </summary>
 457        public EntitySet<AuthUser> AuthUsers
 458        {
 459            get
 460            {
 461                return base.EntityContainer.GetEntitySet<AuthUser>();
 462            }
 463        }
 464        
 465        /// <summary>
 466        /// Gets an EntityQuery instance that can be used to load <see cref="AuthUser"/> entity instances using the 'GetUser' query.
 467        /// </summary>
 468        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="AuthUser"/> entity instances.</returns>
 469        public EntityQuery<AuthUser> GetUserQuery()
 470        {
 471            this.ValidateMethod("GetUserQuery", null);
 472            return base.CreateQuery<AuthUser>("GetUser", null, false, false);
 473        }
 474        
 475        /// <summary>
 476        /// Gets an EntityQuery instance that can be used to load <see cref="AuthUser"/> entity instances using the 'Login' query.
 477        /// </summary>
 478        /// <param name="userName">The value for the 'userName' parameter of the query.</param>
 479        /// <param name="password">The value for the 'password' parameter of the query.</param>
 480        /// <param name="isPersistent">The value for the 'isPersistent' parameter of the query.</param>
 481        /// <param name="customData">The value for the 'customData' parameter of the query.</param>
 482        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="AuthUser"/> entity instances.</returns>
 483        public EntityQuery<AuthUser> LoginQuery(string userName, string password, bool isPersistent, string customData)
 484        {
 485            Dictionary<string, object> parameters = new Dictionary<string, object>();
 486            parameters.Add("userName", userName);
 487            parameters.Add("password", password);
 488            parameters.Add("isPersistent", isPersistent);
 489            parameters.Add("customData", customData);
 490            this.ValidateMethod("LoginQuery", parameters);
 491            return base.CreateQuery<AuthUser>("Login", parameters, true, false);
 492        }
 493        
 494        /// <summary>
 495        /// Gets an EntityQuery instance that can be used to load <see cref="AuthUser"/> entity instances using the 'Logout' query.
 496        /// </summary>
 497        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="AuthUser"/> entity instances.</returns>
 498        public EntityQuery<AuthUser> LogoutQuery()
 499        {
 500            this.ValidateMethod("LogoutQuery", null);
 501            return base.CreateQuery<AuthUser>("Logout", null, true, false);
 502        }
 503        
 504        /// <summary>
 505        /// Creates a new EntityContainer for this DomainContext's EntitySets.
 506        /// </summary>
 507        /// <returns>A new container instance.</returns>
 508        protected override EntityContainer CreateEntityContainer()
 509        {
 510            return new AuthenticationDomainContextEntityContainer();
 511        }
 512        
 513        /// <summary>
 514        /// Service contract for the 'AuthenticationDomainService' DomainService.
 515        /// </summary>
 516        [ServiceContract()]
 517        public interface IAuthenticationDomainServiceContract
 518        {
 519            
 520            /// <summary>
 521            /// Asynchronously invokes the 'GetUser' operation.
 522            /// </summary>
 523            /// <param name="callback">Callback to invoke on completion.</param>
 524            /// <param name="asyncState">Optional state object.</param>
 525            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
 526            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/AuthenticationDomainService/GetUserDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
 527            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/AuthenticationDomainService/GetUser", ReplyAction="http://tempuri.org/AuthenticationDomainService/GetUserResponse")]
 528            [WebGet()]
 529            IAsyncResult BeginGetUser(AsyncCallback callback, object asyncState);
 530            
 531            /// <summary>
 532            /// Completes the asynchronous operation begun by 'BeginGetUser'.
 533            /// </summary>
 534            /// <param name="result">The IAsyncResult returned from 'BeginGetUser'.</param>
 535            /// <returns>The 'QueryResult' returned from the 'GetUser' operation.</returns>
 536            QueryResult<AuthUser> EndGetUser(IAsyncResult result);
 537            
 538            /// <summary>
 539            /// Asynchronously invokes the 'Login' operation.
 540            /// </summary>
 541            /// <param name="userName">The value for the 'userName' parameter of this action.</param>
 542            /// <param name="password">The value for the 'password' parameter of this action.</param>
 543            /// <param name="isPersistent">The value for the 'isPersistent' parameter of this action.</param>
 544            /// <param name="customData">The value for the 'customData' parameter of this action.</param>
 545            /// <param name="callback">Callback to invoke on completion.</param>
 546            /// <param name="asyncState">Optional state object.</param>
 547            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
 548            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/AuthenticationDomainService/LoginDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
 549            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/AuthenticationDomainService/Login", ReplyAction="http://tempuri.org/AuthenticationDomainService/LoginResponse")]
 550            IAsyncResult BeginLogin(string userName, string password, bool isPersistent, string customData, AsyncCallback callback, object asyncState);
 551            
 552            /// <summary>
 553            /// Completes the asynchronous operation begun by 'BeginLogin'.
 554            /// </summary>
 555            /// <param name="result">The IAsyncResult returned from 'BeginLogin'.</param>
 556            /// <returns>The 'QueryResult' returned from the 'Login' operation.</returns>
 557            QueryResult<AuthUser> EndLogin(IAsyncResult result);
 558            
 559            /// <summary>
 560            /// Asynchronously invokes the 'Logout' operation.
 561            /// </summary>
 562            /// <param name="callback">Callback to invoke on completion.</param>
 563            /// <param name="asyncState">Optional state object.</param>
 564            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
 565            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/AuthenticationDomainService/LogoutDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
 566            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/AuthenticationDomainService/Logout", ReplyAction="http://tempuri.org/AuthenticationDomainService/LogoutResponse")]
 567            IAsyncResult BeginLogout(AsyncCallback callback, object asyncState);
 568            
 569            /// <summary>
 570            /// Completes the asynchronous operation begun by 'BeginLogout'.
 571            /// </summary>
 572            /// <param name="result">The IAsyncResult returned from 'BeginLogout'.</param>
 573            /// <returns>The 'QueryResult' returned from the 'Logout' operation.</returns>
 574            QueryResult<AuthUser> EndLogout(IAsyncResult result);
 575            
 576            /// <summary>
 577            /// Asynchronously invokes the 'SubmitChanges' operation.
 578            /// </summary>
 579            /// <param name="changeSet">The change-set to submit.</param>
 580            /// <param name="callback">Callback to invoke on completion.</param>
 581            /// <param name="asyncState">Optional state object.</param>
 582            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
 583            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/AuthenticationDomainService/SubmitChangesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
 584            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/AuthenticationDomainService/SubmitChanges", ReplyAction="http://tempuri.org/AuthenticationDomainService/SubmitChangesResponse")]
 585            IAsyncResult BeginSubmitChanges(IEnumerable<ChangeSetEntry> changeSet, AsyncCallback callback, object asyncState);
 586            
 587            /// <summary>
 588            /// Completes the asynchronous operation begun by 'BeginSubmitChanges'.
 589            /// </summary>
 590            /// <param name="result">The IAsyncResult returned from 'BeginSubmitChanges'.</param>
 591            /// <returns>The collection of change-set entry elements returned from 'SubmitChanges'.</returns>
 592            IEnumerable<ChangeSetEntry> EndSubmitChanges(IAsyncResult result);
 593        }
 594        
 595        internal sealed class AuthenticationDomainContextEntityContainer : EntityContainer
 596        {
 597            
 598            public AuthenticationDomainContextEntityContainer()
 599            {
 600                this.CreateEntitySet<AuthUser>(EntitySetOperations.Edit);
 601            }
 602        }
 603    }
 604    
 605    /// <summary>
 606    /// The 'AuthUser' entity class.
 607    /// </summary>
 608    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
 609    public sealed partial class AuthUser : Entity, global::System.Security.Principal.IIdentity, global::System.Security.Principal.IPrincipal
 610    {
 611        
 612        private string _name = string.Empty;
 613        
 614        private IEnumerable<string> _roles;
 615        
 616        #region Extensibility Method Definitions
 617
 618        /// <summary>
 619        /// This method is invoked from the constructor once initialization is complete and
 620        /// can be used for further object setup.
 621        /// </summary>
 622        partial void OnCreated();
 623        partial void OnNameChanging(string value);
 624        partial void OnNameChanged();
 625        partial void OnRolesChanging(IEnumerable<string> value);
 626        partial void OnRolesChanged();
 627
 628        #endregion
 629        
 630        
 631        /// <summary>
 632        /// Initializes a new instance of the <see cref="AuthUser"/> class.
 633        /// </summary>
 634        public AuthUser()
 635        {
 636            this.OnCreated();
 637        }
 638        
 639        /// <summary>
 640        /// Gets or sets the 'Name' value.
 641        /// </summary>
 642        [DataMember()]
 643        [Editable(false, AllowInitialValue=true)]
 644        [Key()]
 645        [RoundtripOriginal()]
 646        public string Name
 647        {
 648            get
 649            {
 650                return this._name;
 651            }
 652            set
 653            {
 654                if ((this._name != value))
 655                {
 656                    this.OnNameChanging(value);
 657                    this.ValidateProperty("Name", value);
 658                    this._name = value;
 659                    this.RaisePropertyChanged("Name");
 660                    this.OnNameChanged();
 661                    this.RaisePropertyChanged("IsAuthenticated");
 662                }
 663            }
 664        }
 665        
 666        /// <summary>
 667        /// Gets or sets the 'Roles' value.
 668        /// </summary>
 669        [DataMember()]
 670        [Editable(false)]
 671        public IEnumerable<string> Roles
 672        {
 673            get
 674            {
 675                return this._roles;
 676            }
 677            set
 678            {
 679                if ((this._roles != value))
 680                {
 681                    this.OnRolesChanging(value);
 682                    this.ValidateProperty("Roles", value);
 683                    this._roles = value;
 684                    this.RaisePropertyChanged("Roles");
 685                    this.OnRolesChanged();
 686                }
 687            }
 688        }
 689        
 690        string global::System.Security.Principal.IIdentity.AuthenticationType
 691        {
 692            get
 693            {
 694                return string.Empty;
 695            }
 696        }
 697        
 698        /// <summary>
 699        /// Gets a value indicating whether the identity is authenticated.
 700        /// </summary>
 701        /// <remarks>
 702        /// This value is <c>true</c> if <see cref="Name"/> is not <c>null</c> or empty.
 703        /// </remarks>
 704        public bool IsAuthenticated
 705        {
 706            get
 707            {
 708                return (true != string.IsNullOrEmpty(this.Name));
 709            }
 710        }
 711        
 712        string global::System.Security.Principal.IIdentity.Name
 713        {
 714            get
 715            {
 716                return this.Name;
 717            }
 718        }
 719        
 720        global::System.Security.Principal.IIdentity global::System.Security.Principal.IPrincipal.Identity
 721        {
 722            get
 723            {
 724                return this;
 725            }
 726        }
 727        
 728        /// <summary>
 729        /// Computes a value from the key fields that uniquely identifies this entity instance.
 730        /// </summary>
 731        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
 732        public override object GetIdentity()
 733        {
 734            return this._name;
 735        }
 736        
 737        /// <summary>
 738        /// Return whether the principal is in the role.
 739        /// </summary>
 740        /// <remarks>
 741        /// Returns whether the specified role is contained in the roles.
 742        /// This implementation is case sensitive.
 743        /// </remarks>
 744        /// <param name="role">The name of the role for which to check membership.</param>
 745        /// <returns>Whether the principal is in the role.</returns>
 746        public bool IsInRole(string role)
 747        {
 748            if ((this.Roles == null))
 749            {
 750                return false;
 751            }
 752            return global::System.Linq.Enumerable.Contains(this.Roles, role);
 753        }
 754    }
 755    
 756    /// <summary>
 757    /// The 'Course' entity class.
 758    /// </summary>
 759    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
 760    public sealed partial class Course : Entity
 761    {
 762        
 763        private int _id;
 764        
 765        private string _name;
 766        
 767        private EntityCollection<Participation> _participation;
 768        
 769        private byte[] _state;
 770        
 771        private string _type;
 772        
 773        #region Extensibility Method Definitions
 774
 775        /// <summary>
 776        /// This method is invoked from the constructor once initialization is complete and
 777        /// can be used for further object setup.
 778        /// </summary>
 779        partial void OnCreated();
 780        partial void OnIdChanging(int value);
 781        partial void OnIdChanged();
 782        partial void OnNameChanging(string value);
 783        partial void OnNameChanged();
 784        partial void OnStateChanging(byte[] value);
 785        partial void OnStateChanged();
 786        partial void OnTypeChanging(string value);
 787        partial void OnTypeChanged();
 788
 789        #endregion
 790        
 791        
 792        /// <summary>
 793        /// Initializes a new instance of the <see cref="Course"/> class.
 794        /// </summary>
 795        public Course()
 796        {
 797            this.OnCreated();
 798        }
 799        
 800        /// <summary>
 801        /// Gets or sets the 'Id' value.
 802        /// </summary>
 803        [DataMember()]
 804        [Editable(false, AllowInitialValue=true)]
 805        [Key()]
 806        [RoundtripOriginal()]
 807        public int Id
 808        {
 809            get
 810            {
 811                return this._id;
 812            }
 813            set
 814            {
 815                if ((this._id != value))
 816                {
 817                    this.OnIdChanging(value);
 818                    this.ValidateProperty("Id", value);
 819                    this._id = value;
 820                    this.RaisePropertyChanged("Id");
 821                    this.OnIdChanged();
 822                }
 823            }
 824        }
 825        
 826        /// <summary>
 827        /// Gets or sets the 'Name' value.
 828        /// </summary>
 829        [DataMember()]
 830        [Required()]
 831        public string Name
 832        {
 833            get
 834            {
 835                return this._name;
 836            }
 837            set
 838            {
 839                if ((this._name != value))
 840                {
 841                    this.OnNameChanging(value);
 842                    this.RaiseDataMemberChanging("Name");
 843                    this.ValidateProperty("Name", value);
 844                    this._name = value;
 845                    this.RaiseDataMemberChanged("Name");
 846                    this.OnNameChanged();
 847                }
 848            }
 849        }
 850        
 851        /// <summary>
 852        /// Gets the collection of associated <see cref="Participation"/> entity instances.
 853        /// </summary>
 854        [Association("Course_Participation", "Id", "CourseId")]
 855        [XmlIgnore()]
 856        public EntityCollection<Participation> Participation
 857        {
 858            get
 859            {
 860                if ((this._participation == null))
 861                {
 862                    this._participation = new EntityCollection<Participation>(this, "Participation", this.FilterParticipation, this.AttachParticipation, this.DetachParticipation);
 863                }
 864                return this._participation;
 865            }
 866        }
 867        
 868        /// <summary>
 869        /// Gets or sets the 'State' value.
 870        /// </summary>
 871        [DataMember()]
 872        public byte[] State
 873        {
 874            get
 875            {
 876                return this._state;
 877            }
 878            set
 879            {
 880                if ((this._state != value))
 881                {
 882                    this.OnStateChanging(value);
 883                    this.RaiseDataMemberChanging("State");
 884                    this.ValidateProperty("State", value);
 885                    this._state = value;
 886                    this.RaiseDataMemberChanged("State");
 887                    this.OnStateChanged();
 888                }
 889            }
 890        }
 891        
 892        /// <summary>
 893        /// Gets or sets the 'Type' value.
 894        /// </summary>
 895        [DataMember()]
 896        public string Type
 897        {
 898            get
 899            {
 900                return this._type;
 901            }
 902            set
 903            {
 904                if ((this._type != value))
 905                {
 906                    this.OnTypeChanging(value);
 907                    this.RaiseDataMemberChanging("Type");
 908                    this.ValidateProperty("Type", value);
 909                    this._type = value;
 910                    this.RaiseDataMemberChanged("Type");
 911                    this.OnTypeChanged();
 912                }
 913            }
 914        }
 915        
 916        private void AttachParticipation(Participation entity)
 917        {
 918            entity.Course = this;
 919        }
 920        
 921        private void DetachParticipation(Participation entity)
 922        {
 923            entity.Course = null;
 924        }
 925        
 926        private bool FilterParticipation(Participation entity)
 927        {
 928            return (entity.CourseId == this.Id);
 929        }
 930        
 931        /// <summary>
 932        /// Computes a value from the key fields that uniquely identifies this entity instance.
 933        /// </summary>
 934        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
 935        public override object GetIdentity()
 936        {
 937            return this._id;
 938        }
 939    }
 940    
 941    /// <summary>
 942    /// The 'Group' entity class.
 943    /// </summary>
 944    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
 945    public sealed partial class Group : Entity
 946    {
 947        
 948        private int _id;
 949        
 950        private EntityCollection<Membership> _membership;
 951        
 952        private string _name;
 953        
 954        #region Extensibility Method Definitions
 955
 956        /// <summary>
 957        /// This method is invoked from the constructor once initialization is complete and
 958        /// can be used for further object setup.
 959        /// </summary>
 960        partial void OnCreated();
 961        partial void OnIdChanging(int value);
 962        partial void OnIdChanged();
 963        partial void OnNameChanging(string value);
 964        partial void OnNameChanged();
 965
 966        #endregion
 967        
 968        
 969        /// <summary>
 970        /// Initializes a new instance of the <see cref="Group"/> class.
 971        /// </summary>
 972        public Group()
 973        {
 974            this.OnCreated();
 975        }
 976        
 977        /// <summary>
 978        /// Gets or sets the 'Id' value.
 979        /// </summary>
 980        [DataMember()]
 981        [Editable(false, AllowInitialValue=true)]
 982        [Key()]
 983        [RoundtripOriginal()]
 984        public int Id
 985        {
 986            get
 987            {
 988                return this._id;
 989            }
 990            set
 991            {
 992                if ((this._id != value))
 993                {
 994                    this.OnIdChanging(value);
 995                    this.ValidateProperty("Id", value);
 996                    this._id = value;
 997                    this.RaisePropertyChanged("Id");
 998                    this.OnIdChanged();
 999                }
1000            }
1001        }
1002        
1003        /// <summary>
1004        /// Gets the collection of associated <see cref="Membership"/> entity instances.
1005        /// </summary>
1006        [Association("Group_Membership", "Id", "GroupId")]
1007        [XmlIgnore()]
1008        public EntityCollection<Membership> Membership
1009        {
1010            get
1011            {
1012                if ((this._membership == null))
1013                {
1014                    this._membership = new EntityCollection<Membership>(this, "Membership", this.FilterMembership, this.AttachMembership, this.DetachMembership);
1015                }
1016                return this._membership;
1017            }
1018        }
1019        
1020        /// <summary>
1021        /// Gets or sets the 'Name' value.
1022        /// </summary>
1023        [DataMember()]
1024        [Required()]
1025        public string Name
1026        {
1027            get
1028            {
1029                return this._name;
1030            }
1031            set
1032            {
1033                if ((this._name != value))
1034                {
1035                    this.OnNameChanging(value);
1036                    this.RaiseDataMemberChanging("Name");
1037                    this.ValidateProperty("Name", value);
1038                    this._name = value;
1039                    this.RaiseDataMemberChanged("Name");
1040                    this.OnNameChanged();
1041                }
1042            }
1043        }
1044        
1045        private void AttachMembership(Membership entity)
1046        {
1047            entity.Group = this;
1048        }
1049        
1050        private void DetachMembership(Membership entity)
1051        {
1052            entity.Group = null;
1053        }
1054        
1055        private bool FilterMembership(Membership entity)
1056        {
1057            return (entity.GroupId == this.Id);
1058        }
1059        
1060        /// <summary>
1061        /// Computes a value from the key fields that uniquely identifies this entity instance.
1062        /// </summary>
1063        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
1064        public override object GetIdentity()
1065        {
1066            return this._id;
1067        }
1068    }
1069    
1070    /// <summary>
1071    /// The 'Membership' entity class.
1072    /// </summary>
1073    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
1074    public sealed partial class Membership : Entity
1075    {
1076        
1077        private EntityRef<Group> _group;
1078        
1079        private int _groupId;
1080        
1081        private int _id;
1082        
1083        private EntityRef<User> _user;
1084        
1085        private int _userId;
1086        
1087        #region Extensibility Method Definitions
1088
1089        /// <summary>
1090        /// This method is invoked from the constructor once initialization is complete and
1091        /// can be used for further object setup.
1092        /// </summary>
1093        partial void OnCreated();
1094        partial void OnGroupIdChanging(int value);
1095        partial void OnGroupIdChanged();
1096        partial void OnIdChanging(int value);
1097        partial void OnIdChanged();
1098        partial void OnUserIdChanging(int value);
1099        partial void OnUserIdChanged();
1100
1101        #endregion
1102        
1103        
1104        /// <summary>
1105        /// Initializes a new instance of the <see cref="Membership"/> class.
1106        /// </summary>
1107        public Membership()
1108        {
1109            this.OnCreated();
1110        }
1111        
1112        /// <summary>
1113        /// Gets or sets the associated <see cref="Group"/> entity.
1114        /// </summary>
1115        [Association("Group_Membership", "GroupId", "Id", IsForeignKey=true)]
1116        [XmlIgnore()]
1117        public Group Group
1118        {
1119            get
1120            {
1121                if ((this._group == null))
1122                {
1123                    this._group = new EntityRef<Group>(this, "Group", this.FilterGroup);
1124                }
1125                return this._group.Entity;
1126            }
1127            set
1128            {
1129                Group previous = this.Group;
1130                if ((previous != value))
1131                {
1132                    this.ValidateProperty("Group", value);
1133                    if ((previous != null))
1134                    {
1135                        this._group.Entity = null;
1136                        previous.Membership.Remove(this);
1137                    }
1138                    if ((value != null))
1139                    {
1140                        this.GroupId = value.Id;
1141                    }
1142                    else
1143                    {
1144                        this.GroupId = default(int);
1145                    }
1146                    this._group.Entity = value;
1147                    if ((value != null))
1148                    {
1149                        value.Membership.Add(this);
1150                    }
1151                    this.RaisePropertyChanged("Group");
1152                }
1153            }
1154        }
1155        
1156        /// <summary>
1157        /// Gets or sets the 'GroupId' value.
1158        /// </summary>
1159        [DataMember()]
1160        [RoundtripOriginal()]
1161        public int GroupId
1162        {
1163            get
1164            {
1165                return this._groupId;
1166            }
1167            set
1168            {
1169                if ((this._groupId != value))
1170                {
1171                    this.OnGroupIdChanging(value);
1172                    this.RaiseDataMemberChanging("GroupId");
1173                    this.ValidateProperty("GroupId", value);
1174                    this._groupId = value;
1175                    this.RaiseDataMemberChanged("GroupId");
1176                    this.OnGroupIdChanged();
1177                }
1178            }
1179        }
1180        
1181        /// <summary>
1182        /// Gets or sets the 'Id' value.
1183        /// </summary>
1184        [DataMember()]
1185        [Editable(false, AllowInitialValue=true)]
1186        [Key()]
1187        [RoundtripOriginal()]
1188        public int Id
1189        {
1190            get
1191            {
1192                return this._id;
1193            }
1194            set
1195            {
1196                if ((this._id != value))
1197                {
1198                    this.OnIdChanging(value);
1199                    this.ValidateProperty("Id", value);
1200                    this._id = value;
1201                    this.RaisePropertyChanged("Id");
1202                    this.OnIdChanged();
1203                }
1204            }
1205        }
1206        
1207        /// <summary>
1208        /// Gets or sets the associated <see cref="User"/> entity.
1209        /// </summary>
1210        [Association("User_Membership", "UserId", "Id", IsForeignKey=true)]
1211        [XmlIgnore()]
1212        public User User
1213        {
1214            get
1215            {
1216                if ((this._user == null))
1217                {
1218                    this._user = new EntityRef<User>(this, "User", this.FilterUser);
1219                }
1220                return this._user.Entity;
1221            }
1222            set
1223            {
1224                User previous = this.User;
1225                if ((previous != value))
1226                {
1227                    this.ValidateProperty("User", value);
1228                    if ((previous != null))
1229                    {
1230                        this._user.Entity = null;
1231                        previous.Membership.Remove(this);
1232                    }
1233                    if ((value != null))
1234                    {
1235                        this.UserId = value.Id;
1236                    }
1237                    else
1238                    {
1239                        this.UserId = default(int);
1240                    }
1241                    this._user.Entity = value;
1242                    if ((value != null))
1243                    {
1244                        value.Membership.Add(this);
1245                    }
1246                    this.RaisePropertyChanged("User");
1247                }
1248            }
1249        }
1250        
1251        /// <summary>
1252        /// Gets or sets the 'UserId' value.
1253        /// </summary>
1254        [DataMember()]
1255        [RoundtripOriginal()]
1256        public int UserId
1257        {
1258            get
1259            {
1260                return this._userId;
1261            }
1262            set
1263            {
1264                if ((this._userId != value))
1265                {
1266                    this.OnUserIdChanging(value);
1267                    this.RaiseDataMemberChanging("UserId");
1268                    this.ValidateProperty("UserId", value);
1269                    this._userId = value;
1270                    this.RaiseDataMemberChanged("UserId");
1271                    this.OnUserIdChanged();
1272                }
1273            }
1274        }
1275        
1276        private bool FilterGroup(Group entity)
1277        {
1278            return (entity.Id == this.GroupId);
1279        }
1280        
1281        private bool FilterUser(User entity)
1282        {
1283            return (entity.Id == this.UserId);
1284        }
1285        
1286        /// <summary>
1287        /// Computes a value from the key fields that uniquely identifies this entity instance.
1288        /// </summary>
1289        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
1290        public override object GetIdentity()
1291        {
1292            return this._id;
1293        }
1294    }
1295    
1296    /// <summary>
1297    /// The 'Participation' entity class.
1298    /// </summary>
1299    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
1300    public sealed partial class Participation : Entity
1301    {
1302        
1303        private EntityCollection<Assignment> _assignment;
1304        
1305        private EntityRef<Course> _course;
1306        
1307        private int _courseId;
1308        
1309        private int _id;
1310        
1311        private byte[] _state;
1312        
1313        private EntityRef<User> _user;
1314        
1315        private int _userId;
1316        
1317        #region Extensibility Method Definitions
1318
1319        /// <summary>
1320        /// This method is invoked from the constructor once initialization is complete and
1321        /// can be used for further object setup.
1322        /// </summary>
1323        partial void OnCreated();
1324        partial void OnCourseIdChanging(int value);
1325        partial void OnCourseIdChanged();
1326        partial void OnIdChanging(int value);
1327        partial void OnIdChanged();
1328        partial void OnStateChanging(byte[] value);
1329        partial void OnStateChanged();
1330        partial void OnUserIdChanging(int value);
1331        partial void OnUserIdChanged();
1332
1333        #endregion
1334        
1335        
1336        /// <summary>
1337        /// Initializes a new instance of the <see cref="Participation"/> class.
1338        /// </summary>
1339        public Participation()
1340        {
1341            this.OnCreated();
1342        }
1343        
1344        /// <summary>
1345        /// Gets the collection of associated <see cref="Assignment"/> entity instances.
1346        /// </summary>
1347        [Association("Participation_Assignment", "Id", "ParticipationId")]
1348        [XmlIgnore()]
1349        public EntityCollection<Assignment> Assignment
1350        {
1351            get
1352            {
1353                if ((this._assignment == null))
1354                {
1355                    this._assignment = new EntityCollection<Assignment>(this, "Assignment", this.FilterAssignment, this.AttachAssignment, this.DetachAssignment);
1356                }
1357                return this._assignment;
1358            }
1359        }
1360        
1361        /// <summary>
1362        /// Gets or sets the associated <see cref="Course"/> entity.
1363        /// </summary>
1364        [Association("Course_Participation", "CourseId", "Id", IsForeignKey=true)]
1365        [XmlIgnore()]
1366        public Course Course
1367        {
1368            get
1369            {
1370                if ((this._course == null))
1371                {
1372                    this._course = new EntityRef<Course>(this, "Course", this.FilterCourse);
1373                }
1374                return this._course.Entity;
1375            }
1376            set
1377            {
1378                Course previous = this.Course;
1379                if ((previous != value))
1380                {
1381                    this.ValidateProperty("Course", value);
1382                    if ((previous != null))
1383                    {
1384                        this._course.Entity = null;
1385                        previous.Participation.Remove(this);
1386                    }
1387                    if ((value != null))
1388                    {
1389                        this.CourseId = value.Id;
1390                    }
1391                    else
1392                    {
1393                        this.CourseId = default(int);
1394                    }
1395                    this._course.Entity = value;
1396                    if ((value != null))
1397                    {
1398                        value.Participation.Add(this);
1399                    }
1400                    this.RaisePropertyChanged("Course");
1401                }
1402            }
1403        }
1404        
1405        /// <summary>
1406        /// Gets or sets the 'CourseId' value.
1407        /// </summary>
1408        [DataMember()]
1409        [RoundtripOriginal()]
1410        public int CourseId
1411        {
1412            get
1413            {
1414                return this._courseId;
1415            }
1416            set
1417            {
1418                if ((this._courseId != value))
1419                {
1420                    this.OnCourseIdChanging(value);
1421                    this.RaiseDataMemberChanging("CourseId");
1422                    this.ValidateProperty("CourseId", value);
1423                    this._courseId = value;
1424                    this.RaiseDataMemberChanged("CourseId");
1425                    this.OnCourseIdChanged();
1426                }
1427            }
1428        }
1429        
1430        /// <summary>
1431        /// Gets or sets the 'Id' value.
1432        /// </summary>
1433        [DataMember()]
1434        [Editable(false, AllowInitialValue=true)]
1435        [Key()]
1436        [RoundtripOriginal()]
1437        public int Id
1438        {
1439            get
1440            {
1441                return this._id;
1442            }
1443            set
1444            {
1445                if ((this._id != value))
1446                {
1447                    this.OnIdChanging(value);
1448                    this.ValidateProperty("Id", value);
1449                    this._id = value;
1450                    this.RaisePropertyChanged("Id");
1451                    this.OnIdChanged();
1452                }
1453            }
1454        }
1455        
1456        /// <summary>
1457        /// Gets or sets the 'State' value.
1458        /// </summary>
1459        [DataMember()]
1460        public byte[] State
1461        {
1462            get
1463            {
1464                return this._state;
1465            }
1466            set
1467            {
1468                if ((this._state != value))
1469                {
1470                    this.OnStateChanging(value);
1471                    this.RaiseDataMemberChanging("State");
1472                    this.ValidateProperty("State", value);
1473                    this._state = value;
1474                    this.RaiseDataMemberChanged("State");
1475                    this.OnStateChanged();
1476                }
1477            }
1478        }
1479        
1480        /// <summary>
1481        /// Gets or sets the associated <see cref="User"/> entity.
1482        /// </summary>
1483        [Association("User_Participation", "UserId", "Id", IsForeignKey=true)]
1484        [XmlIgnore()]
1485        public User User
1486        {
1487            get
1488            {
1489                if ((this._user == null))
1490                {
1491                    this._user = new EntityRef<User>(this, "User", this.FilterUser);
1492                }
1493                return this._user.Entity;
1494            }
1495            set
1496            {
1497                User previous = this.User;
1498                if ((previous != value))
1499                {
1500                    this.ValidateProperty("User", value);
1501                    if ((previous != null))
1502                    {
1503                        this._user.Entity = null;
1504                        previous.Participation.Remove(this);
1505                    }
1506                    if ((value != null))
1507                    {
1508                        this.UserId = value.Id;
1509                    }
1510                    else
1511                    {
1512                        this.UserId = default(int);
1513                    }
1514                    this._user.Entity = value;
1515                    if ((value != null))
1516                    {
1517                        value.Participation.Add(this);
1518                    }
1519                    this.RaisePropertyChanged("User");
1520                }
1521            }
1522        }
1523        
1524        /// <summary>
1525        /// Gets or sets the 'UserId' value.
1526        /// </summary>
1527        [DataMember()]
1528        [RoundtripOriginal()]
1529        public int UserId
1530        {
1531            get
1532            {
1533                return this._userId;
1534            }
1535            set
1536            {
1537                if ((this._userId != value))
1538                {
1539                    this.OnUserIdChanging(value);
1540                    this.RaiseDataMemberChanging("UserId");
1541                    this.ValidateProperty("UserId", value);
1542                    this._userId = value;
1543                    this.RaiseDataMemberChanged("UserId");
1544                    this.OnUserIdChanged();
1545                }
1546            }
1547        }
1548        
1549        private void AttachAssignment(Assignment entity)
1550        {
1551            entity.Participation = this;
1552        }
1553        
1554        private void DetachAssignment(Assignment entity)
1555        {
1556            entity.Participation = null;
1557        }
1558        
1559        private bool FilterAssignment(Assignment entity)
1560        {
1561            return (entity.ParticipationId == this.Id);
1562        }
1563        
1564        private bool FilterCourse(Course entity)
1565        {
1566            return (entity.Id == this.CourseId);
1567        }
1568        
1569        private bool FilterUser(User entity)
1570        {
1571            return (entity.Id == this.UserId);
1572        }
1573        
1574        /// <summary>
1575        /// Computes a value from the key fields that uniquely identifies this entity instance.
1576        /// </summary>
1577        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
1578        public override object GetIdentity()
1579        {
1580            return this._id;
1581        }
1582    }
1583    
1584    /// <summary>
1585    /// The 'Problem' entity class.
1586    /// </summary>
1587    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
1588    public sealed partial class Problem : Entity
1589    {
1590        
1591        private EntityCollection<Assignment> _assignment;
1592        
1593        private string _filePath;
1594        
1595        private Nullable<int> _groupId;
1596        
1597        private int _id;
1598        
1599        private string _name;
1600        
1601        private EntityRef<ProblemGroup> _problemGroup;
1602        
1603        #region Extensibility Method Definitions
1604
1605        /// <summary>
1606        /// This method is invoked from the constructor once initialization is complete and
1607        /// can be used for further object setup.
1608        /// </summary>
1609        partial void OnCreated();
1610        partial void OnFilePathChanging(string value);
1611        partial void OnFilePathChanged();
1612        partial void OnGroupIdChanging(Nullable<int> value);
1613        partial void OnGroupIdChanged();
1614        partial void OnIdChanging(int value);
1615        partial void OnIdChanged();
1616        partial void OnNameChanging(string value);
1617        partial void OnNameChanged();
1618
1619        #endregion
1620        
1621        
1622        /// <summary>
1623        /// Initializes a new instance of the <see cref="Problem"/> class.
1624        /// </summary>
1625        public Problem()
1626        {
1627            this.OnCreated();
1628        }
1629        
1630        /// <summary>
1631        /// Gets the collection of associated <see cref="Assignment"/> entity instances.
1632        /// </summary>
1633        [Association("Problem_Assignment", "Id", "ProblemId")]
1634        [XmlIgnore()]
1635        public EntityCollection<Assignment> Assignment
1636        {
1637            get
1638            {
1639                if ((this._assignment == null))
1640                {
1641                    this._assignment = new EntityCollection<Assignment>(this, "Assignment", this.FilterAssignment, this.AttachAssignment, this.DetachAssignment);
1642                }
1643                return this._assignment;
1644            }
1645        }
1646        
1647        /// <summary>
1648        /// Gets or sets the 'FilePath' value.
1649        /// </summary>
1650        [DataMember()]
1651        public string FilePath
1652        {
1653            get
1654            {
1655                return this._filePath;
1656            }
1657            set
1658            {
1659                if ((this._filePath != value))
1660                {
1661                    this.OnFilePathChanging(value);
1662                    this.RaiseDataMemberChanging("FilePath");
1663                    this.ValidateProperty("FilePath", value);
1664                    this._filePath = value;
1665                    this.RaiseDataMemberChanged("FilePath");
1666                    this.OnFilePathChanged();
1667                }
1668            }
1669        }
1670        
1671        /// <summary>
1672        /// Gets or sets the 'GroupId' value.
1673        /// </summary>
1674        [DataMember()]
1675        [RoundtripOriginal()]
1676        public Nullable<int> GroupId
1677        {
1678            get
1679            {
1680                return this._groupId;
1681            }
1682            set
1683            {
1684                if ((this._groupId != value))
1685                {
1686                    this.OnGroupIdChanging(value);
1687                    this.RaiseDataMemberChanging("GroupId");
1688                    this.ValidateProperty("GroupId", value);
1689                    this._groupId = value;
1690                    this.RaiseDataMemberChanged("GroupId");
1691                    this.OnGroupIdChanged();
1692                }
1693            }
1694        }
1695        
1696        /// <summary>
1697        /// Gets or sets the 'Id' value.
1698        /// </summary>
1699        [DataMember()]
1700        [Editable(false, AllowInitialValue=true)]
1701        [Key()]
1702        [RoundtripOriginal()]
1703        public int Id
1704        {
1705            get
1706            {
1707                return this._id;
1708            }
1709            set
1710            {
1711                if ((this._id != value))
1712                {
1713                    this.OnIdChanging(value);
1714                    this.ValidateProperty("Id", value);
1715                    this._id = value;
1716                    this.RaisePropertyChanged("Id");
1717                    this.OnIdChanged();
1718                }
1719            }
1720        }
1721        
1722        /// <summary>
1723        /// Gets or sets the 'Name' value.
1724        /// </summary>
1725        [DataMember()]
1726        [Required()]
1727        public string Name
1728        {
1729            get
1730            {
1731                return this._name;
1732            }
1733            set
1734            {
1735                if ((this._name != value))
1736                {
1737                    this.OnNameChanging(value);
1738                    this.RaiseDataMemberChanging("Name");
1739                    this.ValidateProperty("Name", value);
1740                    this._name = value;
1741                    this.RaiseDataMemberChanged("Name");
1742                    this.OnNameChanged();
1743                }
1744            }
1745        }
1746        
1747        /// <summary>
1748        /// Gets or sets the associated <see cref="ProblemGroup"/> entity.
1749        /// </summary>
1750        [Association("ProblemGroup_Problem", "GroupId", "Id", IsForeignKey=true)]
1751        [XmlIgnore()]
1752        public ProblemGroup ProblemGroup
1753        {
1754            get
1755            {
1756                if ((this._problemGroup == null))
1757                {
1758                    this._problemGroup = new EntityRef<ProblemGroup>(this, "ProblemGroup", this.FilterProblemGroup);
1759                }
1760                return this._problemGroup.Entity;
1761            }
1762            set
1763            {
1764                ProblemGroup previous = this.ProblemGroup;
1765                if ((previous != value))
1766                {
1767                    this.ValidateProperty("ProblemGroup", value);
1768                    if ((previous != null))
1769                    {
1770                        this._problemGroup.Entity = null;
1771                        previous.Problem.Remove(this);
1772                    }
1773                    if ((value != null))
1774                    {
1775                        this.GroupId = value.Id;
1776                    }
1777                    else
1778                    {
1779                        this.GroupId = default(Nullable<int>);
1780                    }
1781                    this._problemGroup.Entity = value;
1782                    if ((value != null))
1783                    {
1784                        value.Problem.Add(this);
1785                    }
1786                    this.RaisePropertyChanged("ProblemGroup");
1787                }
1788            }
1789        }
1790        
1791        private void AttachAssignment(Assignment entity)
1792        {
1793            entity.Problem = this;
1794        }
1795        
1796        private void DetachAssignment(Assignment entity)
1797        {
1798            entity.Problem = null;
1799        }
1800        
1801        private bool FilterAssignment(Assignment entity)
1802        {
1803            return (entity.ProblemId == this.Id);
1804        }
1805        
1806        private bool FilterProblemGroup(ProblemGroup entity)
1807        {
1808            return (entity.Id == this.GroupId);
1809        }
1810        
1811        /// <summary>
1812        /// Computes a value from the key fields that uniquely identifies this entity instance.
1813        /// </summary>
1814        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
1815        public override object GetIdentity()
1816        {
1817            return this._id;
1818        }
1819    }
1820    
1821    /// <summary>
1822    /// The 'ProblemGroup' entity class.
1823    /// </summary>
1824    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
1825    public sealed partial class ProblemGroup : Entity
1826    {
1827        
1828        private EntityCollection<ProblemGroup> _children;
1829        
1830        private int _id;
1831        
1832        private string _name;
1833        
1834        private EntityRef<ProblemGroup> _parent;
1835        
1836        private Nullable<int> _parentId;
1837        
1838        private EntityCollection<Problem> _problem;
1839        
1840        #region Extensibility Method Definitions
1841
1842        /// <summary>
1843        /// This method is invoked from the constructor once initialization is complete and
1844        /// can be used for further object setup.
1845        /// </summary>
1846        partial void OnCreated();
1847        partial void OnIdChanging(int value);
1848        partial void OnIdChanged();
1849        partial void OnNameChanging(string value);
1850        partial void OnNameChanged();
1851        partial void OnParentIdChanging(Nullable<int> value);
1852        partial void OnParentIdChanged();
1853
1854        #endregion
1855        
1856        
1857        /// <summary>
1858        /// Initializes a new instance of the <see cref="ProblemGroup"/> class.
1859        /// </summary>
1860        public ProblemGroup()
1861        {
1862            this.OnCreated();
1863        }
1864        
1865        /// <summary>
1866        /// Gets the collection of associated <see cref="ProblemGroup"/> entity instances.
1867        /// </summary>
1868        [Association("ProblemGroup_ProblemGroup", "Id", "ParentId")]
1869        [XmlIgnore()]
1870        public EntityCollection<ProblemGroup> Children
1871        {
1872            get
1873            {
1874                if ((this._children == null))
1875                {
1876                    this._children = new EntityCollection<ProblemGroup>(this, "Children", this.FilterChildren, this.AttachChildren, this.DetachChildren);
1877                }
1878                return this._children;
1879            }
1880        }
1881        
1882        /// <summary>
1883        /// Gets or sets the 'Id' value.
1884        /// </summary>
1885        [DataMember()]
1886        [Editable(false, AllowInitialValue=true)]
1887        [Key()]
1888        [RoundtripOriginal()]
1889        public int Id
1890        {
1891            get
1892            {
1893                return this._id;
1894            }
1895            set
1896            {
1897                if ((this._id != value))
1898                {
1899                    this.OnIdChanging(value);
1900                    this.ValidateProperty("Id", value);
1901                    this._id = value;
1902                    this.RaisePropertyChanged("Id");
1903                    this.OnIdChanged();
1904                }
1905            }
1906        }
1907        
1908        /// <summary>
1909        /// Gets or sets the 'Name' value.
1910        /// </summary>
1911        [DataMember()]
1912        [Required()]
1913        public string Name
1914        {
1915            get
1916            {
1917                return this._name;
1918            }
1919            set
1920            {
1921                if ((this._name != value))
1922                {
1923                    this.OnNameChanging(value);
1924                    this.RaiseDataMemberChanging("Name");
1925                    this.ValidateProperty("Name", value);
1926                    this._name = value;
1927                    this.RaiseDataMemberChanged("Name");
1928                    this.OnNameChanged();
1929                }
1930            }
1931        }
1932        
1933        /// <summary>
1934        /// Gets or sets the associated <see cref="ProblemGroup"/> entity.
1935        /// </summary>
1936        [Association("ProblemGroup_ProblemGroup", "ParentId", "Id", IsForeignKey=true)]
1937        [XmlIgnore()]
1938        public ProblemGroup Parent
1939        {
1940            get
1941            {
1942                if ((this._parent == null))
1943                {
1944                    this._parent = new EntityRef<ProblemGroup>(this, "Parent", this.FilterParent);
1945                }
1946                return this._parent.Entity;
1947            }
1948            set
1949            {
1950                ProblemGroup previous = this.Parent;
1951                if ((previous != value))
1952                {
1953                    this.ValidateProperty("Parent", value);
1954                    if ((previous != null))
1955                    {
1956                        this._parent.Entity = null;
1957                        previous.Children.Remove(this);
1958                    }
1959                    if ((value != null))
1960                    {
1961                        this.ParentId = value.Id;
1962                    }
1963                    else
1964                    {
1965                        this.ParentId = default(Nullable<int>);
1966                    }
1967                    this._parent.Entity = value;
1968                    if ((value != null))
1969                    {
1970                        value.Children.Add(this);
1971                    }
1972                    this.RaisePropertyChanged("Parent");
1973                }
1974            }
1975        }
1976        
1977        /// <summary>
1978        /// Gets or sets the 'ParentId' value.
1979        /// </summary>
1980        [DataMember()]
1981        [RoundtripOriginal()]
1982        public Nullable<int> ParentId
1983        {
1984            get
1985            {
1986                return this._parentId;
1987            }
1988            set
1989            {
1990                if ((this._parentId != value))
1991                {
1992                    this.OnParentIdChanging(value);
1993                    this.RaiseDataMemberChanging("ParentId");
1994                    this.ValidateProperty("ParentId", value);
1995                    this._parentId = value;
1996                    this.RaiseDataMemberChanged("ParentId");
1997                    this.OnParentIdChanged();
1998                }
1999            }
2000        }
2001        
2002        /// <summary>
2003        /// Gets the collection of associated <see cref="Problem"/> entity instances.
2004        /// </summary>
2005        [Association("ProblemGroup_Problem", "Id", "GroupId")]
2006        [XmlIgnore()]
2007        public EntityCollection<Problem> Problem
2008        {
2009            get
2010            {
2011                if ((this._problem == null))
2012                {
2013                    this._problem = new EntityCollection<Problem>(this, "Problem", this.FilterProblem, this.AttachProblem, this.DetachProblem);
2014                }
2015                return this._problem;
2016            }
2017        }
2018        
2019        private void AttachChildren(ProblemGroup entity)
2020        {
2021            entity.Parent = this;
2022        }
2023        
2024        private void DetachChildren(ProblemGroup entity)
2025        {
2026            entity.Parent = null;
2027        }
2028        
2029        private bool FilterChildren(ProblemGroup entity)
2030        {
2031            return (entity.ParentId == this.Id);
2032        }
2033        
2034        private bool FilterParent(ProblemGroup entity)
2035        {
2036            return (entity.Id == this.ParentId);
2037        }
2038        
2039        private void AttachProblem(Problem entity)
2040        {
2041            entity.ProblemGroup = this;
2042        }
2043        
2044        private void DetachProblem(Problem entity)
2045        {
2046            entity.ProblemGroup = null;
2047        }
2048        
2049        private bool FilterProblem(Problem entity)
2050        {
2051            return (entity.GroupId == this.Id);
2052        }
2053        
2054        /// <summary>
2055        /// Computes a value from the key fields that uniquely identifies this entity instance.
2056        /// </summary>
2057        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
2058        public override object GetIdentity()
2059        {
2060            return this._id;
2061        }
2062    }
2063    
2064    /// <summary>
2065    /// The 'Submission' entity class.
2066    /// </summary>
2067    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
2068    public sealed partial class Submission : Entity
2069    {
2070        
2071        private EntityRef<Assignment> _assignment;
2072        
2073        private int _assignmentId;
2074        
2075        private string _filePath;
2076        
2077        private int _id;
2078        
2079        private string _lang;
2080        
2081        private string _result;
2082        
2083        private DateTime _time;
2084        
2085        #region Extensibility Method Definitions
2086
2087        /// <summary>
2088        /// This method is invoked from the constructor once initialization is complete and
2089        /// can be used for further object setup.
2090        /// </summary>
2091        partial void OnCreated();
2092        partial void OnAssignmentIdChanging(int value);
2093        partial void OnAssignmentIdChanged();
2094        partial void OnFilePathChanging(string value);
2095        partial void OnFilePathChanged();
2096        partial void OnIdChanging(int value);
2097        partial void OnIdChanged();
2098        partial void OnLangChanging(string value);
2099        partial void OnLangChanged();
2100        partial void OnResultChanging(string value);
2101        partial void OnResultChanged();
2102        partial void OnTimeChanging(DateTime value);
2103        partial void OnTimeChanged();
2104
2105        #endregion
2106        
2107        
2108        /// <summary>
2109        /// Initializes a new instance of the <see cref="Submission"/> class.
2110        /// </summary>
2111        public Submission()
2112        {
2113            this.OnCreated();
2114        }
2115        
2116        /// <summary>
2117        /// Gets or sets the associated <see cref="Assignment"/> entity.
2118        /// </summary>
2119        [Association("Assignment_Submission", "AssignmentId", "Id", IsForeignKey=true)]
2120        [XmlIgnore()]
2121        public Assignment Assignment
2122        {
2123            get
2124            {
2125                if ((this._assignment == null))
2126                {
2127                    this._assignment = new EntityRef<Assignment>(this, "Assignment", this.FilterAssignment);
2128                }
2129                return this._assignment.Entity;
2130            }
2131            set
2132            {
2133                Assignment previous = this.Assignment;
2134                if ((previous != value))
2135                {
2136                    this.ValidateProperty("Assignment", value);
2137                    if ((previous != null))
2138                    {
2139                        this._assignment.Entity = null;
2140                        previous.Submission.Remove(this);
2141                    }
2142                    if ((value != null))
2143                    {
2144                        this.AssignmentId = value.Id;
2145                    }
2146                    else
2147                    {
2148                        this.AssignmentId = default(int);
2149                    }
2150                    this._assignment.Entity = value;
2151                    if ((value != null))
2152                    {
2153                        value.Submission.Add(this);
2154                    }
2155                    this.RaisePropertyChanged("Assignment");
2156                }
2157            }
2158        }
2159        
2160        /// <summary>
2161        /// Gets or sets the 'AssignmentId' value.
2162        /// </summary>
2163        [DataMember()]
2164        [RoundtripOriginal()]
2165        public int AssignmentId
2166        {
2167            get
2168            {
2169                return this._assignmentId;
2170            }
2171            set
2172            {
2173                if ((this._assignmentId != value))
2174                {
2175                    this.OnAssignmentIdChanging(value);
2176                    this.RaiseDataMemberChanging("AssignmentId");
2177                    this.ValidateProperty("AssignmentId", value);
2178                    this._assignmentId = value;
2179                    this.RaiseDataMemberChanged("AssignmentId");
2180                    this.OnAssignmentIdChanged();
2181                }
2182            }
2183        }
2184        
2185        /// <summary>
2186        /// Gets or sets the 'FilePath' value.
2187        /// </summary>
2188        [DataMember()]
2189        public string FilePath
2190        {
2191            get
2192            {
2193                return this._filePath;
2194            }
2195            set
2196            {
2197                if ((this._filePath != value))
2198                {
2199                    this.OnFilePathChanging(value);
2200                    this.RaiseDataMemberChanging("FilePath");
2201                    this.ValidateProperty("FilePath", value);
2202                    this._filePath = value;
2203                    this.RaiseDataMemberChanged("FilePath");
2204                    this.OnFilePathChanged();
2205                }
2206            }
2207        }
2208        
2209        /// <summary>
2210        /// Gets or sets the 'Id' value.
2211        /// </summary>
2212        [DataMember()]
2213        [Editable(false, AllowInitialValue=true)]
2214        [Key()]
2215        [RoundtripOriginal()]
2216        public int Id
2217        {
2218            get
2219            {
2220                return this._id;
2221            }
2222            set
2223            {
2224                if ((this._id != value))
2225                {
2226                    this.OnIdChanging(value);
2227                    this.ValidateProperty("Id", value);
2228                    this._id = value;
2229                    this.RaisePropertyChanged("Id");
2230                    this.OnIdChanged();
2231                }
2232            }
2233        }
2234        
2235        /// <summary>
2236        /// Gets or sets the 'Lang' value.
2237        /// </summary>
2238        [DataMember()]
2239        public string Lang
2240        {
2241            get
2242            {
2243                return this._lang;
2244            }
2245            set
2246            {
2247                if ((this._lang != value))
2248                {
2249                    this.OnLangChanging(value);
2250                    this.RaiseDataMemberChanging("Lang");
2251                    this.ValidateProperty("Lang", value);
2252                    this._lang = value;
2253                    this.RaiseDataMemberChanged("Lang");
2254                    this.OnLangChanged();
2255                }
2256            }
2257        }
2258        
2259        /// <summary>
2260        /// Gets or sets the 'Result' value.
2261        /// </summary>
2262        [DataMember()]
2263        [Required()]
2264        public string Result
2265        {
2266            get
2267            {
2268                return this._result;
2269            }
2270            set
2271            {
2272                if ((this._result != value))
2273                {
2274                    this.OnResultChanging(value);
2275                    this.RaiseDataMemberChanging("Result");
2276                    this.ValidateProperty("Result", value);
2277                    this._result = value;
2278                    this.RaiseDataMemberChanged("Result");
2279                    this.OnResultChanged();
2280                }
2281            }
2282        }
2283        
2284        /// <summary>
2285        /// Gets or sets the 'Time' value.
2286        /// </summary>
2287        [DataMember()]
2288        public DateTime Time
2289        {
2290            get
2291            {
2292                return this._time;
2293            }
2294            set
2295            {
2296                if ((this._time != value))
2297                {
2298                    this.OnTimeChanging(value);
2299                    this.RaiseDataMemberChanging("Time");
2300                    this.ValidateProperty("Time", value);
2301                    this._time = value;
2302                    this.RaiseDataMemberChanged("Time");
2303                    this.OnTimeChanged();
2304                }
2305            }
2306        }
2307        
2308        private bool FilterAssignment(Assignment entity)
2309        {
2310            return (entity.Id == this.AssignmentId);
2311        }
2312        
2313        /// <summary>
2314        /// Computes a value from the key fields that uniquely identifies this entity instance.
2315        /// </summary>
2316        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
2317        public override object GetIdentity()
2318        {
2319            return this._id;
2320        }
2321    }
2322    
2323    /// <summary>
2324    /// The 'User' entity class.
2325    /// </summary>
2326    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
2327    public sealed partial class User : Entity
2328    {
2329        
2330        private int _id;
2331        
2332        private EntityCollection<Membership> _membership;
2333        
2334        private string _name;
2335        
2336        private EntityCollection<Participation> _participation;
2337        
2338        private string _password;
2339        
2340        #region Extensibility Method Definitions
2341
2342        /// <summary>
2343        /// This method is invoked from the constructor once initialization is complete and
2344        /// can be used for further object setup.
2345        /// </summary>
2346        partial void OnCreated();
2347        partial void OnIdChanging(int value);
2348        partial void OnIdChanged();
2349        partial void OnNameChanging(string value);
2350        partial void OnNameChanged();
2351        partial void OnPasswordChanging(string value);
2352        partial void OnPasswordChanged();
2353
2354        #endregion
2355        
2356        
2357        /// <summary>
2358        /// Initializes a new instance of the <see cref="User"/> class.
2359        /// </summary>
2360        public User()
2361        {
2362            this.OnCreated();
2363        }
2364        
2365        /// <summary>
2366        /// Gets or sets the 'Id' value.
2367        /// </summary>
2368        [DataMember()]
2369        [Editable(false, AllowInitialValue=true)]
2370        [Key()]
2371        [RoundtripOriginal()]
2372        public int Id
2373        {
2374            get
2375            {
2376                return this._id;
2377            }
2378            set
2379            {
2380                if ((this._id != value))
2381                {
2382                    this.OnIdChanging(value);
2383                    this.ValidateProperty("Id", value);
2384                    this._id = value;
2385                    this.RaisePropertyChanged("Id");
2386                    this.OnIdChanged();
2387                }
2388            }
2389        }
2390        
2391        /// <summary>
2392        /// Gets the collection of associated <see cref="Membership"/> entity instances.
2393        /// </summary>
2394        [Association("User_Membership", "Id", "UserId")]
2395        [XmlIgnore()]
2396        public EntityCollection<Membership> Membership
2397        {
2398            get
2399            {
2400                if ((this._membership == null))
2401                {
2402                    this._membership = new EntityCollection<Membership>(this, "Membership", this.FilterMembership, this.AttachMembership, this.DetachMembership);
2403                }
2404                return this._membership;
2405            }
2406        }
2407        
2408        /// <summary>
2409        /// Gets or sets the 'Name' value.
2410        /// </summary>
2411        [DataMember()]
2412        [Required()]
2413        public string Name
2414        {
2415            get
2416            {
2417                return this._name;
2418            }
2419            set
2420            {
2421                if ((this._name != value))
2422                {
2423                    this.OnNameChanging(value);
2424                    this.RaiseDataMemberChanging("Name");
2425                    this.ValidateProperty("Name", value);
2426                    this._name = value;
2427                    this.RaiseDataMemberChanged("Name");
2428                    this.OnNameChanged();
2429                }
2430            }
2431        }
2432        
2433        /// <summary>
2434        /// Gets the collection of associated <see cref="Participation"/> entity instances.
2435        /// </summary>
2436        [Association("User_Participation", "Id", "UserId")]
2437        [XmlIgnore()]
2438        public EntityCollection<Participation> Participation
2439        {
2440            get
2441            {
2442                if ((this._participation == null))
2443                {
2444                    this._participation = new EntityCollection<Participation>(this, "Participation", this.FilterParticipation, this.AttachParticipation, this.DetachParticipation);
2445                }
2446                return this._participation;
2447            }
2448        }
2449        
2450        /// <summary>
2451        /// Gets or sets the 'Password' value.
2452        /// </summary>
2453        [DataMember()]
2454        [Required()]
2455        public string Password
2456        {
2457            get
2458            {
2459                return this._password;
2460            }
2461            set
2462            {
2463                if ((this._password != value))
2464                {
2465                    this.OnPasswordChanging(value);
2466                    this.RaiseDataMemberChanging("Password");
2467                    this.ValidateProperty("Password", value);
2468                    this._password = value;
2469                    this.RaiseDataMemberChanged("Password");
2470                    this.OnPasswordChanged();
2471                }
2472            }
2473        }
2474        
2475        private void AttachMembership(Membership entity)
2476        {
2477            entity.User = this;
2478        }
2479        
2480        private void DetachMembership(Membership entity)
2481        {
2482            entity.User = null;
2483        }
2484        
2485        private bool FilterMembership(Membership entity)
2486        {
2487            return (entity.UserId == this.Id);
2488        }
2489        
2490        private void AttachParticipation(Participation entity)
2491        {
2492            entity.User = this;
2493        }
2494        
2495        private void DetachParticipation(Participation entity)
2496        {
2497            entity.User = null;
2498        }
2499        
2500        private bool FilterParticipation(Participation entity)
2501        {
2502            return (entity.UserId == this.Id);
2503        }
2504        
2505        /// <summary>
2506        /// Computes a value from the key fields that uniquely identifies this entity instance.
2507        /// </summary>
2508        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
2509        public override object GetIdentity()
2510        {
2511            return this._id;
2512        }
2513    }
2514}
2515namespace glados.Web.Services
2516{
2517    using System;
2518    using System.Collections.Generic;
2519    using System.ComponentModel;
2520    using System.ComponentModel.DataAnnotations;
2521    using System.Linq;
2522    using System.ServiceModel;
2523    using System.ServiceModel.DomainServices;
2524    using System.ServiceModel.DomainServices.Client;
2525    using System.ServiceModel.DomainServices.Client.ApplicationServices;
2526    using System.ServiceModel.Web;
2527    using glados.Web;
2528    using glados.Web.Services.Entities;
2529    
2530    
2531    /// <summary>
2532    /// The DomainContext corresponding to the 'StatusService' DomainService.
2533    /// </summary>
2534    public sealed partial class StatusContext : DomainContext
2535    {
2536        
2537        #region Extensibility Method Definitions
2538
2539        /// <summary>
2540        /// This method is invoked from the constructor once initialization is complete and
2541        /// can be used for further object setup.
2542        /// </summary>
2543        partial void OnCreated();
2544
2545        #endregion
2546        
2547        
2548        /// <summary>
2549        /// Initializes a new instance of the <see cref="StatusContext"/> class.
2550        /// </summary>
2551        public StatusContext() : 
2552                this(new WebDomainClient<IStatusServiceContract>(new Uri("glados-Web-Services-StatusService.svc", UriKind.Relative)))
2553        {
2554        }
2555        
2556        /// <summary>
2557        /// Initializes a new instance of the <see cref="StatusContext"/> class with the specified service URI.
2558        /// </summary>
2559        /// <param name="serviceUri">The StatusService service URI.</param>
2560        public StatusContext(Uri serviceUri) : 
2561                this(new WebDomainClient<IStatusServiceContract>(serviceUri))
2562        {
2563        }
2564        
2565        /// <summary>
2566        /// Initializes a new instance of the <see cref="StatusContext"/> class with the specified <paramref name="domainClient"/>.
2567        /// </summary>
2568        /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
2569        public StatusContext(DomainClient domainClient) : 
2570                base(domainClient)
2571        {
2572            this.OnCreated();
2573        }
2574        
2575        /// <summary>
2576        /// Gets the set of <see cref="TestingMachineEntity"/> entity instances that have been loaded into this <see cref="StatusContext"/> instance.
2577        /// </summary>
2578        public EntitySet<TestingMachineEntity> TestingMachineEntities
2579        {
2580            get
2581            {
2582                return base.EntityContainer.GetEntitySet<TestingMachineEntity>();
2583            }
2584        }
2585        
2586        /// <summary>
2587        /// Gets an EntityQuery instance that can be used to load <see cref="TestingMachineEntity"/> entity instances using the 'GetTesterStatus' query.
2588        /// </summary>
2589        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="TestingMachineEntity"/> entity instances.</returns>
2590        public EntityQuery<TestingMachineEntity> GetTesterStatusQuery()
2591        {
2592            this.ValidateMethod("GetTesterStatusQuery", null);
2593            return base.CreateQuery<TestingMachineEntity>("GetTesterStatus", null, false, true);
2594        }
2595        
2596        /// <summary>
2597        /// Asynchronously invokes the 'ReloadProblemsIntoDb' method of the DomainService.
2598        /// </summary>
2599        /// <param name="callback">Callback to invoke when the operation completes.</param>
2600        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
2601        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
2602        public InvokeOperation ReloadProblemsIntoDb(Action<InvokeOperation> callback, object userState)
2603        {
2604            this.ValidateMethod("ReloadProblemsIntoDb", null);
2605            return this.InvokeOperation("ReloadProblemsIntoDb", typeof(void), null, true, callback, userState);
2606        }
2607        
2608        /// <summary>
2609        /// Asynchronously invokes the 'ReloadProblemsIntoDb' method of the DomainService.
2610        /// </summary>
2611        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
2612        public InvokeOperation ReloadProblemsIntoDb()
2613        {
2614            this.ValidateMethod("ReloadProblemsIntoDb", null);
2615            return this.InvokeOperation("ReloadProblemsIntoDb", typeof(void), null, true, null, null);
2616        }
2617        
2618        /// <summary>
2619        /// Asynchronously invokes the 'RetestSubmission' method of the DomainService.
2620        /// </summary>
2621        /// <param name="id">The value for the 'id' parameter of this action.</param>
2622        /// <param name="callback">Callback to invoke when the operation completes.</param>
2623        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
2624        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
2625        public InvokeOperation RetestSubmission(int id, Action<InvokeOperation> callback, object userState)
2626        {
2627            Dictionary<string, object> parameters = new Dictionary<string, object>();
2628            parameters.Add("id", id);
2629            this.ValidateMethod("RetestSubmission", parameters);
2630            return this.InvokeOperation("RetestSubmission", typeof(void), parameters, true, callback, userState);
2631        }
2632        
2633        /// <summary>
2634        /// Asynchronously invokes the 'RetestSubmission' method of the DomainService.
2635        /// </summary>
2636        /// <param name="id">The value for the 'id' parameter of this action.</param>
2637        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
2638        public InvokeOperation RetestSubmission(int id)
2639        {
2640            Dictionary<string, object> parameters = new Dictionary<string, object>();
2641            parameters.Add("id", id);
2642            this.ValidateMethod("RetestSubmission", parameters);
2643            return this.InvokeOperation("RetestSubmission", typeof(void), parameters, true, null, null);
2644        }
2645        
2646        /// <summary>
2647        /// Creates a new EntityContainer for this DomainContext's EntitySets.
2648        /// </summary>
2649        /// <returns>A new container instance.</returns>
2650        protected override EntityContainer CreateEntityContainer()
2651        {
2652            return new StatusContextEntityContainer();
2653        }
2654        
2655        /// <summary>
2656        /// Service contract for the 'StatusService' DomainService.
2657        /// </summary>
2658        [ServiceContract()]
2659        public interface IStatusServiceContract
2660        {
2661            
2662            /// <summary>
2663            /// Asynchronously invokes the 'GetTesterStatus' operation.
2664            /// </summary>
2665            /// <param name="callback">Callback to invoke on completion.</param>
2666            /// <param name="asyncState">Optional state object.</param>
2667            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
2668            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/StatusService/GetTesterStatusDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
2669            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/StatusService/GetTesterStatus", ReplyAction="http://tempuri.org/StatusService/GetTesterStatusResponse")]
2670            [WebGet()]
2671            IAsyncResult BeginGetTesterStatus(AsyncCallback callback, object asyncState);
2672            
2673            /// <summary>
2674            /// Completes the asynchronous operation begun by 'BeginGetTesterStatus'.
2675            /// </summary>
2676            /// <param name="result">The IAsyncResult returned from 'BeginGetTesterStatus'.</param>
2677            /// <returns>The 'QueryResult' returned from the 'GetTesterStatus' operation.</returns>
2678            QueryResult<TestingMachineEntity> EndGetTesterStatus(IAsyncResult result);
2679            
2680            /// <summary>
2681            /// Asynchronously invokes the 'ReloadProblemsIntoDb' operation.
2682            /// </summary>
2683            /// <param name="callback">Callback to invoke on completion.</param>
2684            /// <param name="asyncState">Optional state object.</param>
2685            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
2686            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/StatusService/ReloadProblemsIntoDbDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
2687            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/StatusService/ReloadProblemsIntoDb", ReplyAction="http://tempuri.org/StatusService/ReloadProblemsIntoDbResponse")]
2688            IAsyncResult BeginReloadProblemsIntoDb(AsyncCallback callback, object asyncState);
2689            
2690            /// <summary>
2691            /// Completes the asynchronous operation begun by 'BeginReloadProblemsIntoDb'.
2692            /// </summary>
2693            /// <param name="result">The IAsyncResult returned from 'BeginReloadProblemsIntoDb'.</param>
2694            void EndReloadProblemsIntoDb(IAsyncResult result);
2695            
2696            /// <summary>
2697            /// Asynchronously invokes the 'RetestSubmission' operation.
2698            /// </summary>
2699            /// <param name="id">The value for the 'id' parameter of this action.</param>
2700            /// <param name="callback">Callback to invoke on completion.</param>
2701            /// <param name="asyncState">Optional state object.</param>
2702            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
2703            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/StatusService/RetestSubmissionDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
2704            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/StatusService/RetestSubmission", ReplyAction="http://tempuri.org/StatusService/RetestSubmissionResponse")]
2705            IAsyncResult BeginRetestSubmission(int id, AsyncCallback callback, object asyncState);
2706            
2707            /// <summary>
2708            /// Completes the asynchronous operation begun by 'BeginRetestSubmission'.
2709            /// </summary>
2710            /// <param name="result">The IAsyncResult returned from 'BeginRetestSubmission'.</param>
2711            void EndRetestSubmission(IAsyncResult result);
2712        }
2713        
2714        internal sealed class StatusContextEntityContainer : EntityContainer
2715        {
2716            
2717            public StatusContextEntityContainer()
2718            {
2719                this.CreateEntitySet<TestingMachineEntity>(EntitySetOperations.None);
2720            }
2721        }
2722    }
2723    
2724    /// <summary>
2725    /// The DomainContext corresponding to the 'TaskStructureService' DomainService.
2726    /// </summary>
2727    public sealed partial class TaskStructureContext : DomainContext
2728    {
2729        
2730        #region Extensibility Method Definitions
2731
2732        /// <summary>
2733        /// This method is invoked from the constructor once initialization is complete and
2734        /// can be used for further object setup.
2735        /// </summary>
2736        partial void OnCreated();
2737
2738        #endregion
2739        
2740        
2741        /// <summary>
2742        /// Initializes a new instance of the <see cref="TaskStructureContext"/> class.
2743        /// </summary>
2744        public TaskStructureContext() : 
2745                this(new WebDomainClient<ITaskStructureServiceContract>(new Uri("glados-Web-Services-TaskStructureService.svc", UriKind.Relative)))
2746        {
2747        }
2748        
2749        /// <summary>
2750        /// Initializes a new instance of the <see cref="TaskStructureContext"/> class with the specified service URI.
2751        /// </summary>
2752        /// <param name="serviceUri">The TaskStructureService service URI.</param>
2753        public TaskStructureContext(Uri serviceUri) : 
2754                this(new WebDomainClient<ITaskStructureServiceContract>(serviceUri))
2755        {
2756        }
2757        
2758        /// <summary>
2759        /// Initializes a new instance of the <see cref="TaskStructureContext"/> class with the specified <paramref name="domainClient"/>.
2760        /// </summary>
2761        /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
2762        public TaskStructureContext(DomainClient domainClient) : 
2763                base(domainClient)
2764        {
2765            this.OnCreated();
2766        }
2767        
2768        /// <summary>
2769        /// Gets the set of <see cref="Assignment"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
2770        /// </summary>
2771        public EntitySet<Assignment> Assignments
2772        {
2773            get
2774            {
2775                return base.EntityContainer.GetEntitySet<Assignment>();
2776            }
2777        }
2778        
2779        /// <summary>
2780        /// Gets the set of <see cref="Course"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
2781        /// </summary>
2782        public EntitySet<Course> Courses
2783        {
2784            get
2785            {
2786                return base.EntityContainer.GetEntitySet<Course>();
2787            }
2788        }
2789        
2790        /// <summary>
2791        /// Gets the set of <see cref="Group"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
2792        /// </summary>
2793        public EntitySet<Group> Groups
2794        {
2795            get
2796            {
2797                return base.EntityContainer.GetEntitySet<Group>();
2798            }
2799        }
2800        
2801        /// <summary>
2802        /// Gets the set of <see cref="Membership"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
2803        /// </summary>
2804        public EntitySet<Membership> Memberships
2805        {
2806            get
2807            {
2808                return base.EntityContainer.GetEntitySet<Membership>();
2809            }
2810        }
2811        
2812        /// <summary>
2813        /// Gets the set of <see cref="Participation"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
2814        /// </summary>
2815        public EntitySet<Participation> Participations
2816        {
2817            get
2818            {
2819                return base.EntityContainer.GetEntitySet<Participation>();
2820            }
2821        }
2822        
2823        /// <summary>
2824        /// Gets the set of <see cref="ProblemGroup"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
2825        /// </summary>
2826        public EntitySet<ProblemGroup> ProblemGroups
2827        {
2828            get
2829            {
2830                return base.EntityContainer.GetEntitySet<ProblemGroup>();
2831            }
2832        }
2833        
2834        /// <summary>
2835        /// Gets the set of <see cref="Problem"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
2836        /// </summary>
2837        public EntitySet<Problem> Problems
2838        {
2839            get
2840            {
2841                return base.EntityContainer.GetEntitySet<Problem>();
2842            }
2843        }
2844        
2845        /// <summary>
2846        /// Gets the set of <see cref="Submission"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
2847        /// </summary>
2848        public EntitySet<Submission> Submissions
2849        {
2850            get
2851            {
2852                return base.EntityContainer.GetEntitySet<Submission>();
2853            }
2854        }
2855        
2856        /// <summary>
2857        /// Gets the set of <see cref="User"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
2858        /// </summary>
2859        public EntitySet<User> Users
2860        {
2861            get
2862            {
2863                return base.EntityContainer.GetEntitySet<User>();
2864            }
2865        }
2866        
2867        /// <summary>
2868        /// Gets an EntityQuery instance that can be used to load <see cref="Assignment"/> entity instances using the 'GetAssignmentSet' query.
2869        /// </summary>
2870        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Assignment"/> entity instances.</returns>
2871        public EntityQuery<Assignment> GetAssignmentSetQuery()
2872        {
2873            this.ValidateMethod("GetAssignmentSetQuery", null);
2874            return base.CreateQuery<Assignment>("GetAssignmentSet", null, false, true);
2875        }
2876        
2877        /// <summary>
2878        /// Gets an EntityQuery instance that can be used to load <see cref="Assignment"/> entity instances using the 'GetAssignmentsForMe' query.
2879        /// </summary>
2880        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Assignment"/> entity instances.</returns>
2881        public EntityQuery<Assignment> GetAssignmentsForMeQuery()
2882        {
2883            this.ValidateMethod("GetAssignmentsForMeQuery", null);
2884            return base.CreateQuery<Assignment>("GetAssignmentsForMe", null, false, true);
2885        }
2886        
2887        /// <summary>
2888        /// Gets an EntityQuery instance that can be used to load <see cref="Course"/> entity instances using the 'GetCourseSet' query.
2889        /// </summary>
2890        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Course"/> entity instances.</returns>
2891        public EntityQuery<Course> GetCourseSetQuery()
2892        {
2893            this.ValidateMethod("GetCourseSetQuery", null);
2894            return base.CreateQuery<Course>("GetCourseSet", null, false, true);
2895        }
2896        
2897        /// <summary>
2898        /// Gets an EntityQuery instance that can be used to load <see cref="Group"/> entity instances using the 'GetGroupSet' query.
2899        /// </summary>
2900        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Group"/> entity instances.</returns>
2901        public EntityQuery<Group> GetGroupSetQuery()
2902        {
2903            this.ValidateMethod("GetGroupSetQuery", null);
2904            return base.CreateQuery<Group>("GetGroupSet", null, false, true);
2905        }
2906        
2907        /// <summary>
2908        /// Gets an EntityQuery instance that can be used to load <see cref="Membership"/> entity instances using the 'GetMembershipSet' query.
2909        /// </summary>
2910        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Membership"/> entity instances.</returns>
2911        public EntityQuery<Membership> GetMembershipSetQuery()
2912        {
2913            this.ValidateMethod("GetMembershipSetQuery", null);
2914            return base.CreateQuery<Membership>("GetMembershipSet", null, false, true);
2915        }
2916        
2917        /// <summary>
2918        /// Gets an EntityQuery instance that can be used to load <see cref="Participation"/> entity instances using the 'GetParticipationSet' query.
2919        /// </summary>
2920        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Participation"/> entity instances.</returns>
2921        public EntityQuery<Participation> GetParticipationSetQuery()
2922        {
2923            this.ValidateMethod("GetParticipationSetQuery", null);
2924            return base.CreateQuery<Participation>("GetParticipationSet", null, false, true);
2925        }
2926        
2927        /// <summary>
2928        /// Gets an EntityQuery instance that can be used to load <see cref="ProblemGroup"/> entity instances using the 'GetProblemGroupSet' query.
2929        /// </summary>
2930        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="ProblemGroup"/> entity instances.</returns>
2931        public EntityQuery<ProblemGroup> GetProblemGroupSetQuery()
2932        {
2933            this.ValidateMethod("GetProblemGroupSetQuery", null);
2934            return base.CreateQuery<ProblemGroup>("GetProblemGroupSet", null, false, true);
2935        }
2936        
2937        /// <summary>
2938        /// Gets an EntityQuery instance that can be used to load <see cref="Problem"/> entity instances using the 'GetProblemSet' query.
2939        /// </summary>
2940        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Problem"/> entity instances.</returns>
2941        public EntityQuery<Problem> GetProblemSetQuery()
2942        {
2943            this.ValidateMethod("GetProblemSetQuery", null);
2944            return base.CreateQuery<Problem>("GetProblemSet", null, false, true);
2945        }
2946        
2947        /// <summary>
2948        /// Gets an EntityQuery instance that can be used to load <see cref="Problem"/> entity instances using the 'GetProblemSetByGroupId' query.
2949        /// </summary>
2950        /// <param name="id">The value for the 'id' parameter of the query.</param>
2951        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Problem"/> entity instances.</returns>
2952        public EntityQuery<Problem> GetProblemSetByGroupIdQuery(int id)
2953        {
2954            Dictionary<string, object> parameters = new Dictionary<string, object>();
2955            parameters.Add("id", id);
2956            this.ValidateMethod("GetProblemSetByGroupIdQuery", parameters);
2957            return base.CreateQuery<Problem>("GetProblemSetByGroupId", parameters, false, true);
2958        }
2959        
2960        /// <summary>
2961        /// Gets an EntityQuery instance that can be used to load <see cref="Submission"/> entity instances using the 'GetSubmissionSet' query.
2962        /// </summary>
2963        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Submission"/> entity instances.</returns>
2964        public EntityQuery<Submission> GetSubmissionSetQuery()
2965        {
2966            this.ValidateMethod("GetSubmissionSetQuery", null);
2967            return base.CreateQuery<Submission>("GetSubmissionSet", null, false, true);
2968        }
2969        
2970        /// <summary>
2971        /// Gets an EntityQuery instance that can be used to load <see cref="User"/> entity instances using the 'GetUsers' query.
2972        /// </summary>
2973        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="User"/> entity instances.</returns>
2974        public EntityQuery<User> GetUsersQuery()
2975        {
2976            this.ValidateMethod("GetUsersQuery", null);
2977            return base.CreateQuery<User>("GetUsers", null, false, true);
2978        }
2979        
2980        /// <summary>
2981        /// Creates a new EntityContainer for this DomainContext's EntitySets.
2982        /// </summary>
2983        /// <returns>A new container instance.</returns>
2984        protected override EntityContainer CreateEntityContainer()
2985        {
2986            return new TaskStructureContextEntityContainer();
2987        }
2988        
2989        /// <summary>
2990        /// Service contract for the 'TaskStructureService' DomainService.
2991        /// </summary>
2992        [ServiceContract()]
2993        public interface ITaskStructureServiceContract
2994        {
2995            
2996            /// <summary>
2997            /// Asynchronously invokes the 'GetAssignmentSet' operation.
2998            /// </summary>
2999            /// <param name="callback">Callback to invoke on completion.</param>
3000            /// <param name="asyncState">Optional state object.</param>
3001            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3002            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetAssignmentSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3003            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetAssignmentSet", ReplyAction="http://tempuri.org/TaskStructureService/GetAssignmentSetResponse")]
3004            [WebGet()]
3005            IAsyncResult BeginGetAssignmentSet(AsyncCallback callback, object asyncState);
3006            
3007            /// <summary>
3008            /// Completes the asynchronous operation begun by 'BeginGetAssignmentSet'.
3009            /// </summary>
3010            /// <param name="result">The IAsyncResult returned from 'BeginGetAssignmentSet'.</param>
3011            /// <returns>The 'QueryResult' returned from the 'GetAssignmentSet' operation.</returns>
3012            QueryResult<Assignment> EndGetAssignmentSet(IAsyncResult result);
3013            
3014            /// <summary>
3015            /// Asynchronously invokes the 'GetAssignmentsForMe' operation.
3016            /// </summary>
3017            /// <param name="callback">Callback to invoke on completion.</param>
3018            /// <param name="asyncState">Optional state object.</param>
3019            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3020            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetAssignmentsForMeDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3021            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetAssignmentsForMe", ReplyAction="http://tempuri.org/TaskStructureService/GetAssignmentsForMeResponse")]
3022            [WebGet()]
3023            IAsyncResult BeginGetAssignmentsForMe(AsyncCallback callback, object asyncState);
3024            
3025            /// <summary>
3026            /// Completes the asynchronous operation begun by 'BeginGetAssignmentsForMe'.
3027            /// </summary>
3028            /// <param name="result">The IAsyncResult returned from 'BeginGetAssignmentsForMe'.</param>
3029            /// <returns>The 'QueryResult' returned from the 'GetAssignmentsForMe' operation.</returns>
3030            QueryResult<Assignment> EndGetAssignmentsForMe(IAsyncResult result);
3031            
3032            /// <summary>
3033            /// Asynchronously invokes the 'GetCourseSet' operation.
3034            /// </summary>
3035            /// <param name="callback">Callback to invoke on completion.</param>
3036            /// <param name="asyncState">Optional state object.</param>
3037            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3038            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetCourseSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3039            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetCourseSet", ReplyAction="http://tempuri.org/TaskStructureService/GetCourseSetResponse")]
3040            [WebGet()]
3041            IAsyncResult BeginGetCourseSet(AsyncCallback callback, object asyncState);
3042            
3043            /// <summary>
3044            /// Completes the asynchronous operation begun by 'BeginGetCourseSet'.
3045            /// </summary>
3046            /// <param name="result">The IAsyncResult returned from 'BeginGetCourseSet'.</param>
3047            /// <returns>The 'QueryResult' returned from the 'GetCourseSet' operation.</returns>
3048            QueryResult<Course> EndGetCourseSet(IAsyncResult result);
3049            
3050            /// <summary>
3051            /// Asynchronously invokes the 'GetGroupSet' operation.
3052            /// </summary>
3053            /// <param name="callback">Callback to invoke on completion.</param>
3054            /// <param name="asyncState">Optional state object.</param>
3055            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3056            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetGroupSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3057            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetGroupSet", ReplyAction="http://tempuri.org/TaskStructureService/GetGroupSetResponse")]
3058            [WebGet()]
3059            IAsyncResult BeginGetGroupSet(AsyncCallback callback, object asyncState);
3060            
3061            /// <summary>
3062            /// Completes the asynchronous operation begun by 'BeginGetGroupSet'.
3063            /// </summary>
3064            /// <param name="result">The IAsyncResult returned from 'BeginGetGroupSet'.</param>
3065            /// <returns>The 'QueryResult' returned from the 'GetGroupSet' operation.</returns>
3066            QueryResult<Group> EndGetGroupSet(IAsyncResult result);
3067            
3068            /// <summary>
3069            /// Asynchronously invokes the 'GetMembershipSet' operation.
3070            /// </summary>
3071            /// <param name="callback">Callback to invoke on completion.</param>
3072            /// <param name="asyncState">Optional state object.</param>
3073            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3074            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetMembershipSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3075            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetMembershipSet", ReplyAction="http://tempuri.org/TaskStructureService/GetMembershipSetResponse")]
3076            [WebGet()]
3077            IAsyncResult BeginGetMembershipSet(AsyncCallback callback, object asyncState);
3078            
3079            /// <summary>
3080            /// Completes the asynchronous operation begun by 'BeginGetMembershipSet'.
3081            /// </summary>
3082            /// <param name="result">The IAsyncResult returned from 'BeginGetMembershipSet'.</param>
3083            /// <returns>The 'QueryResult' returned from the 'GetMembershipSet' operation.</returns>
3084            QueryResult<Membership> EndGetMembershipSet(IAsyncResult result);
3085            
3086            /// <summary>
3087            /// Asynchronously invokes the 'GetParticipationSet' operation.
3088            /// </summary>
3089            /// <param name="callback">Callback to invoke on completion.</param>
3090            /// <param name="asyncState">Optional state object.</param>
3091            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3092            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetParticipationSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3093            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetParticipationSet", ReplyAction="http://tempuri.org/TaskStructureService/GetParticipationSetResponse")]
3094            [WebGet()]
3095            IAsyncResult BeginGetParticipationSet(AsyncCallback callback, object asyncState);
3096            
3097            /// <summary>
3098            /// Completes the asynchronous operation begun by 'BeginGetParticipationSet'.
3099            /// </summary>
3100            /// <param name="result">The IAsyncResult returned from 'BeginGetParticipationSet'.</param>
3101            /// <returns>The 'QueryResult' returned from the 'GetParticipationSet' operation.</returns>
3102            QueryResult<Participation> EndGetParticipationSet(IAsyncResult result);
3103            
3104            /// <summary>
3105            /// Asynchronously invokes the 'GetProblemGroupSet' operation.
3106            /// </summary>
3107            /// <param name="callback">Callback to invoke on completion.</param>
3108            /// <param name="asyncState">Optional state object.</param>
3109            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3110            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetProblemGroupSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3111            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetProblemGroupSet", ReplyAction="http://tempuri.org/TaskStructureService/GetProblemGroupSetResponse")]
3112            [WebGet()]
3113            IAsyncResult BeginGetProblemGroupSet(AsyncCallback callback, object asyncState);
3114            
3115            /// <summary>
3116            /// Completes the asynchronous operation begun by 'BeginGetProblemGroupSet'.
3117            /// </summary>
3118            /// <param name="result">The IAsyncResult returned from 'BeginGetProblemGroupSet'.</param>
3119            /// <returns>The 'QueryResult' returned from the 'GetProblemGroupSet' operation.</returns>
3120            QueryResult<ProblemGroup> EndGetProblemGroupSet(IAsyncResult result);
3121            
3122            /// <summary>
3123            /// Asynchronously invokes the 'GetProblemSet' operation.
3124            /// </summary>
3125            /// <param name="callback">Callback to invoke on completion.</param>
3126            /// <param name="asyncState">Optional state object.</param>
3127            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3128            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetProblemSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3129            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetProblemSet", ReplyAction="http://tempuri.org/TaskStructureService/GetProblemSetResponse")]
3130            [WebGet()]
3131            IAsyncResult BeginGetProblemSet(AsyncCallback callback, object asyncState);
3132            
3133            /// <summary>
3134            /// Completes the asynchronous operation begun by 'BeginGetProblemSet'.
3135            /// </summary>
3136            /// <param name="result">The IAsyncResult returned from 'BeginGetProblemSet'.</param>
3137            /// <returns>The 'QueryResult' returned from the 'GetProblemSet' operation.</returns>
3138            QueryResult<Problem> EndGetProblemSet(IAsyncResult result);
3139            
3140            /// <summary>
3141            /// Asynchronously invokes the 'GetProblemSetByGroupId' operation.
3142            /// </summary>
3143            /// <param name="id">The value for the 'id' parameter of this action.</param>
3144            /// <param name="callback">Callback to invoke on completion.</param>
3145            /// <param name="asyncState">Optional state object.</param>
3146            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3147            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetProblemSetByGroupIdDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3148            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetProblemSetByGroupId", ReplyAction="http://tempuri.org/TaskStructureService/GetProblemSetByGroupIdResponse")]
3149            [WebGet()]
3150            IAsyncResult BeginGetProblemSetByGroupId(int id, AsyncCallback callback, object asyncState);
3151            
3152            /// <summary>
3153            /// Completes the asynchronous operation begun by 'BeginGetProblemSetByGroupId'.
3154            /// </summary>
3155            /// <param name="result">The IAsyncResult returned from 'BeginGetProblemSetByGroupId'.</param>
3156            /// <returns>The 'QueryResult' returned from the 'GetProblemSetByGroupId' operation.</returns>
3157            QueryResult<Problem> EndGetProblemSetByGroupId(IAsyncResult result);
3158            
3159            /// <summary>
3160            /// Asynchronously invokes the 'GetSubmissionSet' operation.
3161            /// </summary>
3162            /// <param name="callback">Callback to invoke on completion.</param>
3163            /// <param name="asyncState">Optional state object.</param>
3164            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3165            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetSubmissionSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3166            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetSubmissionSet", ReplyAction="http://tempuri.org/TaskStructureService/GetSubmissionSetResponse")]
3167            [WebGet()]
3168            IAsyncResult BeginGetSubmissionSet(AsyncCallback callback, object asyncState);
3169            
3170            /// <summary>
3171            /// Completes the asynchronous operation begun by 'BeginGetSubmissionSet'.
3172            /// </summary>
3173            /// <param name="result">The IAsyncResult returned from 'BeginGetSubmissionSet'.</param>
3174            /// <returns>The 'QueryResult' returned from the 'GetSubmissionSet' operation.</returns>
3175            QueryResult<Submission> EndGetSubmissionSet(IAsyncResult result);
3176            
3177            /// <summary>
3178            /// Asynchronously invokes the 'GetUsers' operation.
3179            /// </summary>
3180            /// <param name="callback">Callback to invoke on completion.</param>
3181            /// <param name="asyncState">Optional state object.</param>
3182            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3183            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetUsersDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3184            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetUsers", ReplyAction="http://tempuri.org/TaskStructureService/GetUsersResponse")]
3185            [WebGet()]
3186            IAsyncResult BeginGetUsers(AsyncCallback callback, object asyncState);
3187            
3188            /// <summary>
3189            /// Completes the asynchronous operation begun by 'BeginGetUsers'.
3190            /// </summary>
3191            /// <param name="result">The IAsyncResult returned from 'BeginGetUsers'.</param>
3192            /// <returns>The 'QueryResult' returned from the 'GetUsers' operation.</returns>
3193            QueryResult<User> EndGetUsers(IAsyncResult result);
3194            
3195            /// <summary>
3196            /// Asynchronously invokes the 'SubmitChanges' operation.
3197            /// </summary>
3198            /// <param name="changeSet">The change-set to submit.</param>
3199            /// <param name="callback">Callback to invoke on completion.</param>
3200            /// <param name="asyncState">Optional state object.</param>
3201            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3202            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/SubmitChangesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3203            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/SubmitChanges", ReplyAction="http://tempuri.org/TaskStructureService/SubmitChangesResponse")]
3204            IAsyncResult BeginSubmitChanges(IEnumerable<ChangeSetEntry> changeSet, AsyncCallback callback, object asyncState);
3205            
3206            /// <summary>
3207            /// Completes the asynchronous operation begun by 'BeginSubmitChanges'.
3208            /// </summary>
3209            /// <param name="result">The IAsyncResult returned from 'BeginSubmitChanges'.</param>
3210            /// <returns>The collection of change-set entry elements returned from 'SubmitChanges'.</returns>
3211            IEnumerable<ChangeSetEntry> EndSubmitChanges(IAsyncResult result);
3212        }
3213        
3214        internal sealed class TaskStructureContextEntityContainer : EntityContainer
3215        {
3216            
3217            public TaskStructureContextEntityContainer()
3218            {
3219                this.CreateEntitySet<Assignment>(EntitySetOperations.All);
3220                this.CreateEntitySet<Course>(EntitySetOperations.All);
3221                this.CreateEntitySet<Group>(EntitySetOperations.All);
3222                this.CreateEntitySet<Membership>(EntitySetOperations.All);
3223                this.CreateEntitySet<Participation>(EntitySetOperations.All);
3224                this.CreateEntitySet<Problem>(EntitySetOperations.All);
3225                this.CreateEntitySet<ProblemGroup>(EntitySetOperations.All);
3226                this.CreateEntitySet<Submission>(EntitySetOperations.All);
3227                this.CreateEntitySet<User>(EntitySetOperations.All);
3228            }
3229        }
3230    }
3231}
3232namespace glados.Web.Services.Entities
3233{
3234    using System;
3235    using System.Collections.Generic;
3236    using System.ComponentModel;
3237    using System.ComponentModel.DataAnnotations;
3238    using System.Linq;
3239    using System.Runtime.Serialization;
3240    using System.ServiceModel.DomainServices;
3241    using System.ServiceModel.DomainServices.Client;
3242    using System.ServiceModel.DomainServices.Client.ApplicationServices;
3243    using System.Xml.Serialization;
3244    using Glados.TestingModule.Interfaces;
3245    
3246    
3247    /// <summary>
3248    /// The 'ProblemDetails' class.
3249    /// </summary>
3250    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
3251    [XmlRoot(ElementName="task")]
3252    public sealed partial class ProblemDetails : ComplexObject
3253    {
3254        
3255        private string[] _compilers;
3256        
3257        private int _id;
3258        
3259        private string _name;
3260        
3261        private string _statementPath;
3262        
3263        private TestingInformation _testingInformation;
3264        
3265        #region Extensibility Method Definitions
3266
3267        /// <summary>
3268        /// This method is invoked from the constructor once initialization is complete and
3269        /// can be used for further object setup.
3270        /// </summary>
3271        partial void OnCreated();
3272        partial void OnCompilersChanging(string[] value);
3273        partial void OnCompilersChanged();
3274        partial void OnIdChanging(int value);
3275        partial void OnIdChanged();
3276        partial void OnNameChanging(string value);
3277        partial void OnNameChanged();
3278        partial void OnStatementPathChanging(string value);
3279        partial void OnStatementPathChanged();
3280        partial void OnTestingInformationChanging(TestingInformation value);
3281        partial void OnTestingInformationChanged();
3282
3283        #endregion
3284        
3285        
3286        /// <summary>
3287        /// Initializes a new instance of the <see cref="ProblemDetails"/> class.
3288        /// </summary>
3289        public ProblemDetails()
3290        {
3291            this.OnCreated();
3292        }
3293        
3294        /// <summary>
3295        /// Gets or sets the 'Compilers' value.
3296        /// </summary>
3297        [DataMember()]
3298        [XmlIgnore()]
3299        public string[] Compilers
3300        {
3301            get
3302            {
3303                return this._compilers;
3304            }
3305            set
3306            {
3307                if ((this._compilers != value))
3308                {
3309                    this.OnCompilersChanging(value);
3310                    this.RaiseDataMemberChanging("Compilers");
3311                    this.ValidateProperty("Compilers", value);
3312                    this._compilers = value;
3313                    this.RaiseDataMemberChanged("Compilers");
3314                    this.OnCompilersChanged();
3315                }
3316            }
3317        }
3318        
3319        /// <summary>
3320        /// Gets or sets the 'Id' value.
3321        /// </summary>
3322        [DataMember()]
3323        [XmlIgnore()]
3324        public int Id
3325        {
3326            get
3327            {
3328                return this._id;
3329            }
3330            set
3331            {
3332                if ((this._id != value))
3333                {
3334                    this.OnIdChanging(value);
3335                    this.RaiseDataMemberChanging("Id");
3336                    this.ValidateProperty("Id", value);
3337                    this._id = value;
3338                    this.RaiseDataMemberChanged("Id");
3339                    this.OnIdChanged();
3340                }
3341            }
3342        }
3343        
3344        /// <summary>
3345        /// Gets or sets the 'Name' value.
3346        /// </summary>
3347        [DataMember()]
3348        [XmlElement(ElementName="name")]
3349        public string Name
3350        {
3351            get
3352            {
3353                return this._name;
3354            }
3355            set
3356            {
3357                if ((this._name != value))
3358                {
3359                    this.OnNameChanging(value);
3360                    this.RaiseDataMemberChanging("Name");
3361                    this.ValidateProperty("Name", value);
3362                    this._name = value;
3363                    this.RaiseDataMemberChanged("Name");
3364                    this.OnNameChanged();
3365                }
3366            }
3367        }
3368        
3369        /// <summary>
3370        /// Gets or sets the 'StatementPath' value.
3371        /// </summary>
3372        [DataMember()]
3373        [XmlIgnore()]
3374        public string StatementPath
3375        {
3376            get
3377            {
3378                return this._statementPath;
3379            }
3380            set
3381            {
3382                if ((this._statementPath != value))
3383                {
3384                    this.OnStatementPathChanging(value);
3385                    this.RaiseDataMemberChanging("StatementPath");
3386                    this.ValidateProperty("StatementPath", value);
3387                    this._statementPath = value;
3388                    this.RaiseDataMemberChanged("StatementPath");
3389                    this.OnStatementPathChanged();
3390                }
3391            }
3392        }
3393        
3394        /// <summary>
3395        /// Gets or sets the 'TestingInformation' value.
3396        /// </summary>
3397        [DataMember()]
3398        [Display(AutoGenerateField=false)]
3399        [XmlElement(ElementName="testingInfo")]
3400        public TestingInformation TestingInformation
3401        {
3402            get
3403            {
3404                return this._testingInformation;
3405            }
3406            set
3407            {
3408                if ((this._testingInformation != value))
3409                {
3410                    this.OnTestingInformationChanging(value);
3411                    this.RaiseDataMemberChanging("TestingInformation");
3412                    this.ValidateProperty("TestingInformation", value);
3413                    this._testingInformation = value;
3414                    this.RaiseDataMemberChanged("TestingInformation");
3415                    this.OnTestingInformationChanged();
3416                }
3417            }
3418        }
3419    }
3420    
3421    /// <summary>
3422    /// The 'TaskIOFile' class.
3423    /// </summary>
3424    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
3425    public sealed partial class TaskIOFile : ComplexObject
3426    {
3427        
3428        private string _name;
3429        
3430        private string _type;
3431        
3432        #region Extensibility Method Definitions
3433
3434        /// <summary>
3435        /// This method is invoked from the constructor once initialization is complete and
3436        /// can be used for further object setup.
3437        /// </summary>
3438        partial void OnCreated();
3439        partial void OnNameChanging(string value);
3440        partial void OnNameChanged();
3441        partial void OnTypeChanging(string value);
3442        partial void OnTypeChanged();
3443
3444        #endregion
3445        
3446        
3447        /// <summary>
3448        /// Initializes a new instance of the <see cref="TaskIOFile"/> class.
3449        /// </summary>
3450        public TaskIOFile()
3451        {
3452            this.OnCreated();
3453        }
3454        
3455        /// <summary>
3456        /// Gets or sets the 'Name' value.
3457        /// </summary>
3458        [DataMember()]
3459        [XmlText()]
3460        public string Name
3461        {
3462            get
3463            {
3464                return this._name;
3465            }
3466            set
3467            {
3468                if ((this._name != value))
3469                {
3470                    this.OnNameChanging(value);
3471                    this.RaiseDataMemberChanging("Name");
3472                    this.ValidateProperty("Name", value);
3473                    this._name = value;
3474                    this.RaiseDataMemberChanged("Name");
3475                    this.OnNameChanged();
3476                }
3477            }
3478        }
3479        
3480        /// <summary>
3481        /// Gets or sets the 'Type' value.
3482        /// </summary>
3483        [DataMember()]
3484        [XmlAttribute(AttributeName="type")]
3485        public string Type
3486        {
3487            get
3488            {
3489                return this._type;
3490            }
3491            set
3492            {
3493                if ((this._type != value))
3494                {
3495                    this.OnTypeChanging(value);
3496                    this.RaiseDataMemberChanging("Type");
3497                    this.ValidateProperty("Type", value);
3498                    this._type = value;
3499                    this.RaiseDataMemberChanged("Type");
3500                    this.OnTypeChanged();
3501                }
3502            }
3503        }
3504    }
3505    
3506    /// <summary>
3507    /// The 'TestDescriptor' class.
3508    /// </summary>
3509    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
3510    public sealed partial class TestDescriptor : ComplexObject
3511    {
3512        
3513        private int _id;
3514        
3515        private int _memoryLimitMb;
3516        
3517        private float _timeLimitSec;
3518        
3519        #region Extensibility Method Definitions
3520
3521        /// <summary>
3522        /// This method is invoked from the constructor once initialization is complete and
3523        /// can be used for further object setup.
3524        /// </summary>
3525        partial void OnCreated();
3526        partial void OnIdChanging(int value);
3527        partial void OnIdChanged();
3528        partial void OnMemoryLimitMbChanging(int value);
3529        partial void OnMemoryLimitMbChanged();
3530        partial void OnTimeLimitSecChanging(float value);
3531        partial void OnTimeLimitSecChanged();
3532
3533        #endregion
3534        
3535        
3536        /// <summary>
3537        /// Initializes a new instance of the <see cref="TestDescriptor"/> class.
3538        /// </summary>
3539        public TestDescriptor()
3540        {
3541            this.OnCreated();
3542        }
3543        
3544        /// <summary>
3545        /// Gets or sets the 'Id' value.
3546        /// </summary>
3547        [DataMember()]
3548        [XmlAttribute(AttributeName="id")]
3549        public int Id
3550        {
3551            get
3552            {
3553                return this._id;
3554            }
3555            set
3556            {
3557                if ((this._id != value))
3558                {
3559                    this.OnIdChanging(value);
3560                    this.RaiseDataMemberChanging("Id");
3561                    this.ValidateProperty("Id", value);
3562                    this._id = value;
3563                    this.RaiseDataMemberChanged("Id");
3564                    this.OnIdChanged();
3565                }
3566            }
3567        }
3568        
3569        /// <summary>
3570        /// Gets or sets the 'MemoryLimitMb' value.
3571        /// </summary>
3572        [DataMember()]
3573        [XmlAttribute(AttributeName="memoryLimit")]
3574        public int MemoryLimitMb
3575        {
3576            get
3577            {
3578                return this._memoryLimitMb;
3579            }
3580            set
3581            {
3582                if ((this._memoryLimitMb != value))
3583                {
3584                    this.OnMemoryLimitMbChanging(value);
3585                    this.RaiseDataMemberChanging("MemoryLimitMb");
3586                    this.ValidateProperty("MemoryLimitMb", value);
3587                    this._memoryLimitMb = value;
3588                    this.RaiseDataMemberChanged("MemoryLimitMb");
3589                    this.OnMemoryLimitMbChanged();
3590                }
3591            }
3592        }
3593        
3594        /// <summary>
3595        /// Gets or sets the 'TimeLimitSec' value.
3596        /// </summary>
3597        [DataMember()]
3598        [XmlAttribute(AttributeName="timeLimit")]
3599        public float TimeLimitSec
3600        {
3601            get
3602            {
3603                return this._timeLimitSec;
3604            }
3605            set
3606            {
3607                if ((this._timeLimitSec != value))
3608                {
3609                    this.OnTimeLimitSecChanging(value);
3610                    this.RaiseDataMemberChanging("TimeLimitSec");
3611                    this.ValidateProperty("TimeLimitSec", value);
3612                    this._timeLimitSec = value;
3613                    this.RaiseDataMemberChanged("TimeLimitSec");
3614                    this.OnTimeLimitSecChanged();
3615                }
3616            }
3617        }
3618    }
3619    
3620    /// <summary>
3621    /// The 'TestingInformation' class.
3622    /// </summary>
3623    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
3624    public sealed partial class TestingInformation : ComplexObject
3625    {
3626        
3627        private TaskIOFile[] _ioFiles;
3628        
3629        private TestDescriptor[] _tests;
3630        
3631        #region Extensibility Method Definitions
3632
3633        /// <summary>
3634        /// This method is invoked from the constructor once initialization is complete and
3635        /// can be used for further object setup.
3636        /// </summary>
3637        partial void OnCreated();
3638        partial void OnIOFilesChanging(TaskIOFile[] value);
3639        partial void OnIOFilesChanged();
3640        partial void OnTestsChanging(TestDescriptor[] value);
3641        partial void OnTestsChanged();
3642
3643        #endregion
3644        
3645        
3646        /// <summary>
3647        /// Initializes a new instance of the <see cref="TestingInformation"/> class.
3648        /// </summary>
3649        public TestingInformation()
3650        {
3651            this.OnCreated();
3652        }
3653        
3654        /// <summary>
3655        /// Gets or sets the 'IOFiles' value.
3656        /// </summary>
3657        [DataMember()]
3658        [Display(AutoGenerateField=false)]
3659        [XmlArray(ElementName="files")]
3660        [XmlArrayItem(ElementName="file")]
3661        public TaskIOFile[] IOFiles
3662        {
3663            get
3664            {
3665                return this._ioFiles;
3666            }
3667            set
3668            {
3669                if ((this._ioFiles != value))
3670                {
3671                    this.OnIOFilesChanging(value);
3672                    this.RaiseDataMemberChanging("IOFiles");
3673                    this.ValidateProperty("IOFiles", value);
3674                    this._ioFiles = value;
3675                    this.RaiseDataMemberChanged("IOFiles");
3676                    this.OnIOFilesChanged();
3677                }
3678            }
3679        }
3680        
3681        /// <summary>
3682        /// Gets or sets the 'Tests' value.
3683        /// </summary>
3684        [DataMember()]
3685        [Display(AutoGenerateField=false)]
3686        [XmlArray(ElementName="tests")]
3687        [XmlArrayItem(ElementName="test")]
3688        public TestDescriptor[] Tests
3689        {
3690            get
3691            {
3692                return this._tests;
3693            }
3694            set
3695            {
3696                if ((this._tests != value))
3697                {
3698                    this.OnTestsChanging(value);
3699                    this.RaiseDataMemberChanging("Tests");
3700                    this.ValidateProperty("Tests", value);
3701                    this._tests = value;
3702                    this.RaiseDataMemberChanged("Tests");
3703                    this.OnTestsChanged();
3704                }
3705            }
3706        }
3707    }
3708    
3709    /// <summary>
3710    /// The 'TestingMachineEntity' entity class.
3711    /// </summary>
3712    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
3713    public sealed partial class TestingMachineEntity : Entity
3714    {
3715        
3716        private string _name;
3717        
3718        private ServerStatus _status;
3719        
3720        #region Extensibility Method Definitions
3721
3722        /// <summary>
3723        /// This method is invoked from the constructor once initialization is complete and
3724        /// can be used for further object setup.
3725        /// </summary>
3726        partial void OnCreated();
3727        partial void OnNameChanging(string value);
3728        partial void OnNameChanged();
3729        partial void OnStatusChanging(ServerStatus value);
3730        partial void OnStatusChanged();
3731
3732        #endregion
3733        
3734        
3735        /// <summary>
3736        /// Initializes a new instance of the <see cref="TestingMachineEntity"/> class.
3737        /// </summary>
3738        public TestingMachineEntity()
3739        {
3740            this.OnCreated();
3741        }
3742        
3743        /// <summary>
3744        /// Gets or sets the 'Name' value.
3745        /// </summary>
3746        [DataMember()]
3747        [Editable(false, AllowInitialValue=true)]
3748        [Key()]
3749        [RoundtripOriginal()]
3750        public string Name
3751        {
3752            get
3753            {
3754                return this._name;
3755            }
3756            set
3757            {
3758                if ((this._name != value))
3759                {
3760                    this.OnNameChanging(value);
3761                    this.ValidateProperty("Name", value);
3762                    this._name = value;
3763                    this.RaisePropertyChanged("Name");
3764                    this.OnNameChanged();
3765                }
3766            }
3767        }
3768        
3769        /// <summary>
3770        /// Gets or sets the 'Status' value.
3771        /// </summary>
3772        [DataMember()]
3773        public ServerStatus Status
3774        {
3775            get
3776            {
3777                return this._status;
3778            }
3779            set
3780            {
3781                if ((this._status != value))
3782                {
3783                    this.OnStatusChanging(value);
3784                    this.RaiseDataMemberChanging("Status");
3785                    this.ValidateProperty("Status", value);
3786                    this._status = value;
3787                    this.RaiseDataMemberChanged("Status");
3788                    this.OnStatusChanged();
3789                }
3790            }
3791        }
3792        
3793        /// <summary>
3794        /// Computes a value from the key fields that uniquely identifies this entity instance.
3795        /// </summary>
3796        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
3797        public override object GetIdentity()
3798        {
3799            return this._name;
3800        }
3801    }
3802}
3803namespace glados.Web.Services.RIAServices
3804{
3805    using System;
3806    using System.Collections.Generic;
3807    using System.ComponentModel;
3808    using System.ComponentModel.DataAnnotations;
3809    using System.Linq;
3810    using System.ServiceModel;
3811    using System.ServiceModel.DomainServices;
3812    using System.ServiceModel.DomainServices.Client;
3813    using System.ServiceModel.DomainServices.Client.ApplicationServices;
3814    using glados.Web.Services.Entities;
3815    
3816    
3817    /// <summary>
3818    /// The DomainContext corresponding to the 'CompetitionAdminService' DomainService.
3819    /// </summary>
3820    public sealed partial class CompetitionAdminContext : DomainContext
3821    {
3822        
3823        #region Extensibility Method Definitions
3824
3825        /// <summary>
3826        /// This method is invoked from the constructor once initialization is complete and
3827        /// can be used for further object setup.
3828        /// </summary>
3829        partial void OnCreated();
3830
3831        #endregion
3832        
3833        
3834        /// <summary>
3835        /// Initializes a new instance of the <see cref="CompetitionAdminContext"/> class.
3836        /// </summary>
3837        public CompetitionAdminContext() : 
3838                this(new WebDomainClient<ICompetitionAdminServiceContract>(new Uri("glados-Web-Services-RIAServices-CompetitionAdminService.svc", UriKind.Relative)))
3839        {
3840        }
3841        
3842        /// <summary>
3843        /// Initializes a new instance of the <see cref="CompetitionAdminContext"/> class with the specified service URI.
3844        /// </summary>
3845        /// <param name="serviceUri">The CompetitionAdminService service URI.</param>
3846        public CompetitionAdminContext(Uri serviceUri) : 
3847                this(new WebDomainClient<ICompetitionAdminServiceContract>(serviceUri))
3848        {
3849        }
3850        
3851        /// <summary>
3852        /// Initializes a new instance of the <see cref="CompetitionAdminContext"/> class with the specified <paramref name="domainClient"/>.
3853        /// </summary>
3854        /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
3855        public CompetitionAdminContext(DomainClient domainClient) : 
3856                base(domainClient)
3857        {
3858            this.OnCreated();
3859        }
3860        
3861        /// <summary>
3862        /// Asynchronously invokes the 'CreateCompetition' method of the DomainService.
3863        /// </summary>
3864        /// <param name="name">The value for the 'name' parameter of this action.</param>
3865        /// <param name="typeName">The value for the 'typeName' parameter of this action.</param>
3866        /// <param name="callback">Callback to invoke when the operation completes.</param>
3867        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
3868        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
3869        public InvokeOperation<int> CreateCompetition(string name, string typeName, Action<InvokeOperation<int>> callback, object userState)
3870        {
3871            Dictionary<string, object> parameters = new Dictionary<string, object>();
3872            parameters.Add("name", name);
3873            parameters.Add("typeName", typeName);
3874            this.ValidateMethod("CreateCompetition", parameters);
3875            return ((InvokeOperation<int>)(this.InvokeOperation("CreateCompetition", typeof(int), parameters, true, callback, userState)));
3876        }
3877        
3878        /// <summary>
3879        /// Asynchronously invokes the 'CreateCompetition' method of the DomainService.
3880        /// </summary>
3881        /// <param name="name">The value for the 'name' parameter of this action.</param>
3882        /// <param name="typeName">The value for the 'typeName' parameter of this action.</param>
3883        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
3884        public InvokeOperation<int> CreateCompetition(string name, string typeName)
3885        {
3886            Dictionary<string, object> parameters = new Dictionary<string, object>();
3887            parameters.Add("name", name);
3888            parameters.Add("typeName", typeName);
3889            this.ValidateMethod("CreateCompetition", parameters);
3890            return ((InvokeOperation<int>)(this.InvokeOperation("CreateCompetition", typeof(int), parameters, true, null, null)));
3891        }
3892        
3893        /// <summary>
3894        /// Asynchronously invokes the 'DeleteCompetition' method of the DomainService.
3895        /// </summary>
3896        /// <param name="id">The value for the 'id' parameter of this action.</param>
3897        /// <param name="callback">Callback to invoke when the operation completes.</param>
3898        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
3899        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
3900        public InvokeOperation DeleteCompetition(int id, Action<InvokeOperation> callback, object userState)
3901        {
3902            Dictionary<string, object> parameters = new Dictionary<string, object>();
3903            parameters.Add("id", id);
3904            this.ValidateMethod("DeleteCompetition", parameters);
3905            return this.InvokeOperation("DeleteCompetition", typeof(void), parameters, true, callback, userState);
3906        }
3907        
3908        /// <summary>
3909        /// Asynchronously invokes the 'DeleteCompetition' method of the DomainService.
3910        /// </summary>
3911        /// <param name="id">The value for the 'id' parameter of this action.</param>
3912        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
3913        public InvokeOperation DeleteCompetition(int id)
3914        {
3915            Dictionary<string, object> parameters = new Dictionary<string, object>();
3916            parameters.Add("id", id);
3917            this.ValidateMethod("DeleteCompetition", parameters);
3918            return this.InvokeOperation("DeleteCompetition", typeof(void), parameters, true, null, null);
3919        }
3920        
3921        /// <summary>
3922        /// Asynchronously invokes the 'GetCompetitionMainPage' method of the DomainService.
3923        /// </summary>
3924        /// <param name="id">The value for the 'id' parameter of this action.</param>
3925        /// <param name="callback">Callback to invoke when the operation completes.</param>
3926        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
3927        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
3928        public InvokeOperation<Uri> GetCompetitionMainPage(int id, Action<InvokeOperation<Uri>> callback, object userState)
3929        {
3930            Dictionary<string, object> parameters = new Dictionary<string, object>();
3931            parameters.Add("id", id);
3932            this.ValidateMethod("GetCompetitionMainPage", parameters);
3933            return ((InvokeOperation<Uri>)(this.InvokeOperation("GetCompetitionMainPage", typeof(Uri), parameters, true, callback, userState)));
3934        }
3935        
3936        /// <summary>
3937        /// Asynchronously invokes the 'GetCompetitionMainPage' method of the DomainService.
3938        /// </summary>
3939        /// <param name="id">The value for the 'id' parameter of this action.</param>
3940        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
3941        public InvokeOperation<Uri> GetCompetitionMainPage(int id)
3942        {
3943            Dictionary<string, object> parameters = new Dictionary<string, object>();
3944            parameters.Add("id", id);
3945            this.ValidateMethod("GetCompetitionMainPage", parameters);
3946            return ((InvokeOperation<Uri>)(this.InvokeOperation("GetCompetitionMainPage", typeof(Uri), parameters, true, null, null)));
3947        }
3948        
3949        /// <summary>
3950        /// Asynchronously invokes the 'GetCompetitionTypeList' method of the DomainService.
3951        /// </summary>
3952        /// <param name="callback">Callback to invoke when the operation completes.</param>
3953        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
3954        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
3955        public InvokeOperation<IEnumerable<string>> GetCompetitionTypeList(Action<InvokeOperation<IEnumerable<string>>> callback, object userState)
3956        {
3957            this.ValidateMethod("GetCompetitionTypeList", null);
3958            return ((InvokeOperation<IEnumerable<string>>)(this.InvokeOperation("GetCompetitionTypeList", typeof(IEnumerable<string>), null, true, callback, userState)));
3959        }
3960        
3961        /// <summary>
3962        /// Asynchronously invokes the 'GetCompetitionTypeList' method of the DomainService.
3963        /// </summary>
3964        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
3965        public InvokeOperation<IEnumerable<string>> GetCompetitionTypeList()
3966        {
3967            this.ValidateMethod("GetCompetitionTypeList", null);
3968            return ((InvokeOperation<IEnumerable<string>>)(this.InvokeOperation("GetCompetitionTypeList", typeof(IEnumerable<string>), null, true, null, null)));
3969        }
3970        
3971        /// <summary>
3972        /// Creates a new EntityContainer for this DomainContext's EntitySets.
3973        /// </summary>
3974        /// <returns>A new container instance.</returns>
3975        protected override EntityContainer CreateEntityContainer()
3976        {
3977            return new CompetitionAdminContextEntityContainer();
3978        }
3979        
3980        /// <summary>
3981        /// Service contract for the 'CompetitionAdminService' DomainService.
3982        /// </summary>
3983        [ServiceContract()]
3984        public interface ICompetitionAdminServiceContract
3985        {
3986            
3987            /// <summary>
3988            /// Asynchronously invokes the 'CreateCompetition' operation.
3989            /// </summary>
3990            /// <param name="name">The value for the 'name' parameter of this action.</param>
3991            /// <param name="typeName">The value for the 'typeName' parameter of this action.</param>
3992            /// <param name="callback">Callback to invoke on completion.</param>
3993            /// <param name="asyncState">Optional state object.</param>
3994            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3995            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/CreateCompetitionDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3996            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/CreateCompetition", ReplyAction="http://tempuri.org/CompetitionAdminService/CreateCompetitionResponse")]
3997            IAsyncResult BeginCreateCompetition(string name, string typeName, AsyncCallback callback, object asyncState);
3998            
3999            /// <summary>
4000            /// Completes the asynchronous operation begun by 'BeginCreateCompetition'.
4001            /// </summary>
4002            /// <param name="result">The IAsyncResult returned from 'BeginCreateCompetition'.</param>
4003            /// <returns>The 'Int32' returned from the 'CreateCompetition' operation.</returns>
4004            int EndCreateCompetition(IAsyncResult result);
4005            
4006            /// <summary>
4007            /// Asynchronously invokes the 'DeleteCompetition' operation.
4008            /// </summary>
4009            /// <param name="id">The value for the 'id' parameter of this action.</param>
4010            /// <param name="callback">Callback to invoke on completion.</param>
4011            /// <param name="asyncState">Optional state object.</param>
4012            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
4013            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/DeleteCompetitionDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
4014            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/DeleteCompetition", ReplyAction="http://tempuri.org/CompetitionAdminService/DeleteCompetitionResponse")]
4015            IAsyncResult BeginDeleteCompetition(int id, AsyncCallback callback, object asyncState);
4016            
4017            /// <summary>
4018            /// Completes the asynchronous operation begun by 'BeginDeleteCompetition'.
4019            /// </summary>
4020            /// <param name="result">The IAsyncResult returned from 'BeginDeleteCompetition'.</param>
4021            void EndDeleteCompetition(IAsyncResult result);
4022            
4023            /// <summary>
4024            /// Asynchronously invokes the 'GetCompetitionMainPage' operation.
4025            /// </summary>
4026            /// <param name="id">The value for the 'id' parameter of this action.</param>
4027            /// <param name="callback">Callback to invoke on completion.</param>
4028            /// <param name="asyncState">Optional state object.</param>
4029            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
4030            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/GetCompetitionMainPageDomainServiceFau" +
4031                "lt", Name="DomainServiceFault", Namespace="DomainServices")]
4032            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/GetCompetitionMainPage", ReplyAction="http://tempuri.org/CompetitionAdminService/GetCompetitionMainPageResponse")]
4033            IAsyncResult BeginGetCompetitionMainPage(int id, AsyncCallback callback, object asyncState);
4034            
4035            /// <summary>
4036            /// Completes the asynchronous operation begun by 'BeginGetCompetitionMainPage'.
4037            /// </summary>
4038            /// <param name="result">The IAsyncResult returned from 'BeginGetCompetitionMainPage'.</param>
4039            /// <returns>The 'Uri' returned from the 'GetCompetitionMainPage' operation.</returns>
4040            Uri EndGetCompetitionMainPage(IAsyncResult result);
4041            
4042            /// <summary>
4043            /// Asynchronously invokes the 'GetCompetitionTypeList' operation.
4044            /// </summary>
4045            /// <param name="callback">Callback to invoke on completion.</param>
4046            /// <param name="asyncState">Optional state object.</param>
4047            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
4048            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/GetCompetitionTypeListDomainServiceFau" +
4049                "lt", Name="DomainServiceFault", Namespace="DomainServices")]
4050            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/GetCompetitionTypeList", ReplyAction="http://tempuri.org/CompetitionAdminService/GetCompetitionTypeListResponse")]
4051            IAsyncResult BeginGetCompetitionTypeList(AsyncCallback callback, object asyncState);
4052            
4053            /// <summary>
4054            /// Completes the asynchronous operation begun by 'BeginGetCompetitionTypeList'.
4055            /// </summary>
4056            /// <param name="result">The IAsyncResult returned from 'BeginGetCompetitionTypeList'.</param>
4057            /// <returns>The 'IEnumerable`1' returned from the 'GetCompetitionTypeList' operation.</returns>
4058            IEnumerable<string> EndGetCompetitionTypeList(IAsyncResult result);
4059        }
4060        
4061        internal sealed class CompetitionAdminContextEntityContainer : EntityContainer
4062        {
4063            
4064            public CompetitionAdminContextEntityContainer()
4065            {
4066            }
4067        }
4068    }
4069    
4070    /// <summary>
4071    /// The DomainContext corresponding to the 'ParticipationService' DomainService.
4072    /// </summary>
4073    public sealed partial class ParticipationContext : DomainContext
4074    {
4075        
4076        #region Extensibility Method Definitions
4077
4078        /// <summary>
4079        /// This method is invoked from the constructor once initialization is complete and
4080        /// can be used for further object setup.
4081        /// </summary>
4082        partial void OnCreated();
4083
4084        #endregion
4085        
4086        
4087        /// <summary>
4088        /// Initializes a new instance of the <see cref="ParticipationContext"/> class.
4089        /// </summary>
4090        public ParticipationContext() : 
4091                this(new WebDomainClient<IParticipationServiceContract>(new Uri("glados-Web-Services-RIAServices-ParticipationService.svc", UriKind.Relative)))
4092        {
4093        }
4094        
4095        /// <summary>
4096        /// Initializes a new instance of the <see cref="ParticipationContext"/> class with the specified service URI.
4097        /// </summary>
4098        /// <param name="serviceUri">The ParticipationService service URI.</param>
4099        public ParticipationContext(Uri serviceUri) : 
4100                this(new WebDomainClient<IParticipationServiceContract>(serviceUri))
4101        {
4102        }
4103        
4104        /// <summary>
4105        /// Initializes a new instance of the <see cref="ParticipationContext"/> class with the specified <paramref name="domainClient"/>.
4106        /// </summary>
4107        /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
4108        public ParticipationContext(DomainClient domainClient) : 
4109                base(domainClient)
4110        {
4111            this.OnCreated();
4112        }
4113        
4114        /// <summary>
4115        /// Asynchronously invokes the 'GetProblemByAssignmentId' method of the DomainService.
4116        /// </summary>
4117        /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
4118        /// <param name="callback">Callback to invoke when the operation completes.</param>
4119        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
4120        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4121        public InvokeOperation<ProblemDetails> GetProblemByAssignmentId(int assignmentId, Action<InvokeOperation<ProblemDetails>> callback, object userState)
4122        {
4123            Dictionary<string, object> parameters = new Dictionary<string, object>();
4124            parameters.Add("assignmentId", assignmentId);
4125            this.ValidateMethod("GetProblemByAssignmentId", parameters);
4126            return ((InvokeOperation<ProblemDetails>)(this.InvokeOperation("GetProblemByAssignmentId", typeof(ProblemDetails), parameters, true, callback, userState)));
4127        }
4128        
4129        /// <summary>
4130        /// Asynchronously invokes the 'GetProblemByAssignmentId' method of the DomainService.
4131        /// </summary>
4132        /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
4133        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4134        public InvokeOperation<ProblemDetails> GetProblemByAssignmentId(int assignmentId)
4135        {
4136            Dictionary<string, object> parameters = new Dictionary<string, object>();
4137            parameters.Add("assignmentId", assignmentId);
4138            this.ValidateMethod("GetProblemByAssignmentId", parameters);
4139            return ((InvokeOperation<ProblemDetails>)(this.InvokeOperation("GetProblemByAssignmentId", typeof(ProblemDetails), parameters, true, null, null)));
4140        }
4141        
4142        /// <summary>
4143        /// Asynchronously invokes the 'GetProblemDetails' method of the DomainService.
4144        /// </summary>
4145        /// <param name="problemId">The value for the 'problemId' parameter of this action.</param>
4146        /// <param name="callback">Callback to invoke when the operation completes.</param>
4147        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
4148        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4149        public InvokeOperation<ProblemDetails> GetProblemDetails(int problemId, Action<InvokeOperation<ProblemDetails>> callback, object userState)
4150        {
4151            Dictionary<string, object> parameters = new Dictionary<string, object>();
4152            parameters.Add("problemId", problemId);
4153            this.ValidateMethod("GetProblemDetails", parameters);
4154            return ((InvokeOperation<ProblemDetails>)(this.InvokeOperation("GetProblemDetails", typeof(ProblemDetails), parameters, true, callback, userState)));
4155        }
4156        
4157        /// <summary>
4158        /// Asynchronously invokes the 'GetProblemDetails' method of the DomainService.
4159        /// </summary>
4160        /// <param name="problemId">The value for the 'problemId' parameter of this action.</param>
4161        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4162        public InvokeOperation<ProblemDetails> GetProblemDetails(int problemId)
4163        {
4164            Dictionary<string, object> parameters = new Dictionary<string, object>();
4165            parameters.Add("problemId", problemId);
4166            this.ValidateMethod("GetProblemDetails", parameters);
4167            return ((InvokeOperation<ProblemDetails>)(this.InvokeOperation("GetProblemDetails", typeof(ProblemDetails), parameters, true, null, null)));
4168        }
4169        
4170        /// <summary>
4171        /// Asynchronously invokes the 'SubmitSolution' method of the DomainService.
4172        /// </summary>
4173        /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
4174        /// <param name="compilerName">The value for the 'compilerName' parameter of this action.</param>
4175        /// <param name="source">The value for the 'source' parameter of this action.</param>
4176        /// <param name="callback">Callback to invoke when the operation completes.</param>
4177        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
4178        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4179        public InvokeOperation<int> SubmitSolution(int assignmentId, string compilerName, byte[] source, Action<InvokeOperation<int>> callback, object userState)
4180        {
4181            Dictionary<string, object> parameters = new Dictionary<string, object>();
4182            parameters.Add("assignmentId", assignmentId);
4183            parameters.Add("compilerName", compilerName);
4184            parameters.Add("source", source);
4185            this.ValidateMethod("SubmitSolution", parameters);
4186            return ((InvokeOperation<int>)(this.InvokeOperation("SubmitSolution", typeof(int), parameters, true, callback, userState)));
4187        }
4188        
4189        /// <summary>
4190        /// Asynchronously invokes the 'SubmitSolution' method of the DomainService.
4191        /// </summary>
4192        /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
4193        /// <param name="compilerName">The value for the 'compilerName' parameter of this action.</param>
4194        /// <param name="source">The value for the 'source' parameter of this action.</param>
4195        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4196        public InvokeOperation<int> SubmitSolution(int assignmentId, string compilerName, byte[] source)
4197        {
4198            Dictionary<string, object> parameters = new Dictionary<string, object>();
4199            parameters.Add("assignmentId", assignmentId);
4200            parameters.Add("compilerName", compilerName);
4201            parameters.Add("source", source);
4202            this.ValidateMethod("SubmitSolution", parameters);
4203            return ((InvokeOperation<int>)(this.InvokeOperation("SubmitSolution", typeof(int), parameters, true, null, null)));
4204        }
4205        
4206        /// <summary>
4207        /// Creates a new EntityContainer for this DomainContext's EntitySets.
4208        /// </summary>
4209        /// <returns>A new container instance.</returns>
4210        protected override EntityContainer CreateEntityContainer()
4211        {
4212            return new ParticipationContextEntityContainer();
4213        }
4214        
4215        /// <summary>
4216        /// Service contract for the 'ParticipationService' DomainService.
4217        /// </summary>
4218        [ServiceContract()]
4219        public interface IParticipationServiceContract
4220        {
4221            
4222            /// <summary>
4223            /// Asynchronously invokes the 'GetProblemByAssignmentId' operation.
4224            /// </summary>
4225            /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
4226            /// <param name="callback">Callback to invoke on completion.</param>
4227            /// <param name="asyncState">Optional state object.</param>
4228            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
4229            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ParticipationService/GetProblemByAssignmentIdDomainServiceFaul" +
4230                "t", Name="DomainServiceFault", Namespace="DomainServices")]
4231            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ParticipationService/GetProblemByAssignmentId", ReplyAction="http://tempuri.org/ParticipationService/GetProblemByAssignmentIdResponse")]
4232            IAsyncResult BeginGetProblemByAssignmentId(int assignmentId, AsyncCallback callback, object asyncState);
4233            
4234            /// <summary>
4235            /// Completes the asynchronous operation begun by 'BeginGetProblemByAssignmentId'.
4236            /// </summary>
4237            /// <param name="result">The IAsyncResult returned from 'BeginGetProblemByAssignmentId'.</param>
4238            /// <returns>The 'ProblemDetails' returned from the 'GetProblemByAssignmentId' operation.</returns>
4239            ProblemDetails EndGetProblemByAssignmentId(IAsyncResult result);
4240            
4241            /// <summary>
4242            /// Asynchronously invokes the 'GetProblemDetails' operation.
4243            /// </summary>
4244            /// <param name="problemId">The value for the 'problemId' parameter of this action.</param>
4245            /// <param name="callback">Callback to invoke on completion.</param>
4246            /// <param name="asyncState">Optional state object.</param>
4247            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
4248            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ParticipationService/GetProblemDetailsDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
4249            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ParticipationService/GetProblemDetails", ReplyAction="http://tempuri.org/ParticipationService/GetProblemDetailsResponse")]
4250            IAsyncResult BeginGetProblemDetails(int problemId, AsyncCallback callback, object asyncState);
4251            
4252            /// <summary>
4253            /// Completes the asynchronous operation begun by 'BeginGetProblemDetails'.
4254            /// </summary>
4255            /// <param name="result">The IAsyncResult returned from 'BeginGetProblemDetails'.</param>
4256            /// <returns>The 'ProblemDetails' returned from the 'GetProblemDetails' operation.</returns>
4257            ProblemDetails EndGetProblemDetails(IAsyncResult result);
4258            
4259            /// <summary>
4260            /// Asynchronously invokes the 'SubmitSolution' operation.
4261            /// </summary>
4262            /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
4263            /// <param name="compilerName">The value for the 'compilerName' parameter of this action.</param>
4264            /// <param name="source">The value for the 'source' parameter of this action.</param>
4265            /// <param name="callback">Callback to invoke on completion.</param>
4266            /// <param name="asyncState">Optional state object.</param>
4267            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
4268            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ParticipationService/SubmitSolutionDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
4269            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ParticipationService/SubmitSolution", ReplyAction="http://tempuri.org/ParticipationService/SubmitSolutionResponse")]
4270            IAsyncResult BeginSubmitSolution(int assignmentId, string compilerName, byte[] source, AsyncCallback callback, object asyncState);
4271            
4272            /// <summary>
4273            /// Completes the asynchronous operation begun by 'BeginSubmitSolution'.
4274            /// </summary>
4275            /// <param name="result">The IAsyncResult returned from 'BeginSubmitSolution'.</param>
4276            /// <returns>The 'Int32' returned from the 'SubmitSolution' operation.</returns>
4277            int EndSubmitSolution(IAsyncResult result);
4278        }
4279        
4280        internal sealed class ParticipationContextEntityContainer : EntityContainer
4281        {
4282            
4283            public ParticipationContextEntityContainer()
4284            {
4285            }
4286        }
4287    }
4288}