PageRenderTime 134ms CodeModel.GetById 5ms app.highlight 101ms RepoModel.GetById 1ms app.codeStats 1ms

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

https://bitbucket.org/lucky_geck/tsys
C# | 5490 lines | 3474 code | 581 blank | 1435 comment | 263 complexity | cab37df988f6307caed2a42a087b87be MD5 | raw file
   1//------------------------------------------------------------------------------
   2// <auto-generated>
   3//     This code was generated by a tool.
   4//     Runtime Version:4.0.30319.1
   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 'Message' entity class.
1298    /// </summary>
1299    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
1300    public sealed partial class Message : Entity
1301    {
1302        
1303        private int _id;
1304        
1305        private int _receiverId;
1306        
1307        private int _senderId;
1308        
1309        private DateTime _sentTime;
1310        
1311        private int _status;
1312        
1313        private string _subject;
1314        
1315        private string _text;
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 OnIdChanging(int value);
1325        partial void OnIdChanged();
1326        partial void OnReceiverIdChanging(int value);
1327        partial void OnReceiverIdChanged();
1328        partial void OnSenderIdChanging(int value);
1329        partial void OnSenderIdChanged();
1330        partial void OnSentTimeChanging(DateTime value);
1331        partial void OnSentTimeChanged();
1332        partial void OnStatusChanging(int value);
1333        partial void OnStatusChanged();
1334        partial void OnSubjectChanging(string value);
1335        partial void OnSubjectChanged();
1336        partial void OnTextChanging(string value);
1337        partial void OnTextChanged();
1338
1339        #endregion
1340        
1341        
1342        /// <summary>
1343        /// Initializes a new instance of the <see cref="Message"/> class.
1344        /// </summary>
1345        public Message()
1346        {
1347            this.OnCreated();
1348        }
1349        
1350        /// <summary>
1351        /// Gets or sets the 'Id' value.
1352        /// </summary>
1353        // The following attributes were not generated:
1354        // 
1355        // - The attribute 'System.ComponentModel.DataAnnotations.DatabaseGeneratedAttribute' is not visible in the client project 'glados.UI'. Are you missing an assembly reference?
1356        // [DatabaseGeneratedAttribute(Identity)]
1357        // 
1358        [DataMember()]
1359        [Editable(false, AllowInitialValue=true)]
1360        [Key()]
1361        [RoundtripOriginal()]
1362        public int Id
1363        {
1364            get
1365            {
1366                return this._id;
1367            }
1368            set
1369            {
1370                if ((this._id != value))
1371                {
1372                    this.OnIdChanging(value);
1373                    this.ValidateProperty("Id", value);
1374                    this._id = value;
1375                    this.RaisePropertyChanged("Id");
1376                    this.OnIdChanged();
1377                }
1378            }
1379        }
1380        
1381        /// <summary>
1382        /// Gets or sets the 'ReceiverId' value.
1383        /// </summary>
1384        [DataMember()]
1385        [RoundtripOriginal()]
1386        public int ReceiverId
1387        {
1388            get
1389            {
1390                return this._receiverId;
1391            }
1392            set
1393            {
1394                if ((this._receiverId != value))
1395                {
1396                    this.OnReceiverIdChanging(value);
1397                    this.RaiseDataMemberChanging("ReceiverId");
1398                    this.ValidateProperty("ReceiverId", value);
1399                    this._receiverId = value;
1400                    this.RaiseDataMemberChanged("ReceiverId");
1401                    this.OnReceiverIdChanged();
1402                }
1403            }
1404        }
1405        
1406        /// <summary>
1407        /// Gets or sets the 'SenderId' value.
1408        /// </summary>
1409        [DataMember()]
1410        [RoundtripOriginal()]
1411        public int SenderId
1412        {
1413            get
1414            {
1415                return this._senderId;
1416            }
1417            set
1418            {
1419                if ((this._senderId != value))
1420                {
1421                    this.OnSenderIdChanging(value);
1422                    this.RaiseDataMemberChanging("SenderId");
1423                    this.ValidateProperty("SenderId", value);
1424                    this._senderId = value;
1425                    this.RaiseDataMemberChanged("SenderId");
1426                    this.OnSenderIdChanged();
1427                }
1428            }
1429        }
1430        
1431        /// <summary>
1432        /// Gets or sets the 'SentTime' value.
1433        /// </summary>
1434        [DataMember()]
1435        public DateTime SentTime
1436        {
1437            get
1438            {
1439                return this._sentTime;
1440            }
1441            set
1442            {
1443                if ((this._sentTime != value))
1444                {
1445                    this.OnSentTimeChanging(value);
1446                    this.RaiseDataMemberChanging("SentTime");
1447                    this.ValidateProperty("SentTime", value);
1448                    this._sentTime = value;
1449                    this.RaiseDataMemberChanged("SentTime");
1450                    this.OnSentTimeChanged();
1451                }
1452            }
1453        }
1454        
1455        /// <summary>
1456        /// Gets or sets the 'Status' value.
1457        /// </summary>
1458        [DataMember()]
1459        public int Status
1460        {
1461            get
1462            {
1463                return this._status;
1464            }
1465            set
1466            {
1467                if ((this._status != value))
1468                {
1469                    this.OnStatusChanging(value);
1470                    this.RaiseDataMemberChanging("Status");
1471                    this.ValidateProperty("Status", value);
1472                    this._status = value;
1473                    this.RaiseDataMemberChanged("Status");
1474                    this.OnStatusChanged();
1475                }
1476            }
1477        }
1478        
1479        /// <summary>
1480        /// Gets or sets the 'Subject' value.
1481        /// </summary>
1482        [DataMember()]
1483        [Required()]
1484        public string Subject
1485        {
1486            get
1487            {
1488                return this._subject;
1489            }
1490            set
1491            {
1492                if ((this._subject != value))
1493                {
1494                    this.OnSubjectChanging(value);
1495                    this.RaiseDataMemberChanging("Subject");
1496                    this.ValidateProperty("Subject", value);
1497                    this._subject = value;
1498                    this.RaiseDataMemberChanged("Subject");
1499                    this.OnSubjectChanged();
1500                }
1501            }
1502        }
1503        
1504        /// <summary>
1505        /// Gets or sets the 'Text' value.
1506        /// </summary>
1507        [DataMember()]
1508        [Required()]
1509        public string Text
1510        {
1511            get
1512            {
1513                return this._text;
1514            }
1515            set
1516            {
1517                if ((this._text != value))
1518                {
1519                    this.OnTextChanging(value);
1520                    this.RaiseDataMemberChanging("Text");
1521                    this.ValidateProperty("Text", value);
1522                    this._text = value;
1523                    this.RaiseDataMemberChanged("Text");
1524                    this.OnTextChanged();
1525                }
1526            }
1527        }
1528        
1529        /// <summary>
1530        /// Computes a value from the key fields that uniquely identifies this entity instance.
1531        /// </summary>
1532        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
1533        public override object GetIdentity()
1534        {
1535            return this._id;
1536        }
1537    }
1538    
1539    /// <summary>
1540    /// The 'Participation' entity class.
1541    /// </summary>
1542    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
1543    public sealed partial class Participation : Entity
1544    {
1545        
1546        private EntityCollection<Assignment> _assignment;
1547        
1548        private EntityRef<Course> _course;
1549        
1550        private int _courseId;
1551        
1552        private int _id;
1553        
1554        private byte[] _state;
1555        
1556        private EntityRef<User> _user;
1557        
1558        private int _userId;
1559        
1560        #region Extensibility Method Definitions
1561
1562        /// <summary>
1563        /// This method is invoked from the constructor once initialization is complete and
1564        /// can be used for further object setup.
1565        /// </summary>
1566        partial void OnCreated();
1567        partial void OnCourseIdChanging(int value);
1568        partial void OnCourseIdChanged();
1569        partial void OnIdChanging(int value);
1570        partial void OnIdChanged();
1571        partial void OnStateChanging(byte[] value);
1572        partial void OnStateChanged();
1573        partial void OnUserIdChanging(int value);
1574        partial void OnUserIdChanged();
1575
1576        #endregion
1577        
1578        
1579        /// <summary>
1580        /// Initializes a new instance of the <see cref="Participation"/> class.
1581        /// </summary>
1582        public Participation()
1583        {
1584            this.OnCreated();
1585        }
1586        
1587        /// <summary>
1588        /// Gets the collection of associated <see cref="Assignment"/> entity instances.
1589        /// </summary>
1590        [Association("Participation_Assignment", "Id", "ParticipationId")]
1591        [XmlIgnore()]
1592        public EntityCollection<Assignment> Assignment
1593        {
1594            get
1595            {
1596                if ((this._assignment == null))
1597                {
1598                    this._assignment = new EntityCollection<Assignment>(this, "Assignment", this.FilterAssignment, this.AttachAssignment, this.DetachAssignment);
1599                }
1600                return this._assignment;
1601            }
1602        }
1603        
1604        /// <summary>
1605        /// Gets or sets the associated <see cref="Course"/> entity.
1606        /// </summary>
1607        [Association("Course_Participation", "CourseId", "Id", IsForeignKey=true)]
1608        [XmlIgnore()]
1609        public Course Course
1610        {
1611            get
1612            {
1613                if ((this._course == null))
1614                {
1615                    this._course = new EntityRef<Course>(this, "Course", this.FilterCourse);
1616                }
1617                return this._course.Entity;
1618            }
1619            set
1620            {
1621                Course previous = this.Course;
1622                if ((previous != value))
1623                {
1624                    this.ValidateProperty("Course", value);
1625                    if ((previous != null))
1626                    {
1627                        this._course.Entity = null;
1628                        previous.Participation.Remove(this);
1629                    }
1630                    if ((value != null))
1631                    {
1632                        this.CourseId = value.Id;
1633                    }
1634                    else
1635                    {
1636                        this.CourseId = default(int);
1637                    }
1638                    this._course.Entity = value;
1639                    if ((value != null))
1640                    {
1641                        value.Participation.Add(this);
1642                    }
1643                    this.RaisePropertyChanged("Course");
1644                }
1645            }
1646        }
1647        
1648        /// <summary>
1649        /// Gets or sets the 'CourseId' value.
1650        /// </summary>
1651        [DataMember()]
1652        [RoundtripOriginal()]
1653        public int CourseId
1654        {
1655            get
1656            {
1657                return this._courseId;
1658            }
1659            set
1660            {
1661                if ((this._courseId != value))
1662                {
1663                    this.OnCourseIdChanging(value);
1664                    this.RaiseDataMemberChanging("CourseId");
1665                    this.ValidateProperty("CourseId", value);
1666                    this._courseId = value;
1667                    this.RaiseDataMemberChanged("CourseId");
1668                    this.OnCourseIdChanged();
1669                }
1670            }
1671        }
1672        
1673        /// <summary>
1674        /// Gets or sets the 'Id' value.
1675        /// </summary>
1676        [DataMember()]
1677        [Editable(false, AllowInitialValue=true)]
1678        [Key()]
1679        [RoundtripOriginal()]
1680        public int Id
1681        {
1682            get
1683            {
1684                return this._id;
1685            }
1686            set
1687            {
1688                if ((this._id != value))
1689                {
1690                    this.OnIdChanging(value);
1691                    this.ValidateProperty("Id", value);
1692                    this._id = value;
1693                    this.RaisePropertyChanged("Id");
1694                    this.OnIdChanged();
1695                }
1696            }
1697        }
1698        
1699        /// <summary>
1700        /// Gets or sets the 'State' value.
1701        /// </summary>
1702        [DataMember()]
1703        public byte[] State
1704        {
1705            get
1706            {
1707                return this._state;
1708            }
1709            set
1710            {
1711                if ((this._state != value))
1712                {
1713                    this.OnStateChanging(value);
1714                    this.RaiseDataMemberChanging("State");
1715                    this.ValidateProperty("State", value);
1716                    this._state = value;
1717                    this.RaiseDataMemberChanged("State");
1718                    this.OnStateChanged();
1719                }
1720            }
1721        }
1722        
1723        /// <summary>
1724        /// Gets or sets the associated <see cref="User"/> entity.
1725        /// </summary>
1726        [Association("User_Participation", "UserId", "Id", IsForeignKey=true)]
1727        [XmlIgnore()]
1728        public User User
1729        {
1730            get
1731            {
1732                if ((this._user == null))
1733                {
1734                    this._user = new EntityRef<User>(this, "User", this.FilterUser);
1735                }
1736                return this._user.Entity;
1737            }
1738            set
1739            {
1740                User previous = this.User;
1741                if ((previous != value))
1742                {
1743                    this.ValidateProperty("User", value);
1744                    if ((previous != null))
1745                    {
1746                        this._user.Entity = null;
1747                        previous.Participation.Remove(this);
1748                    }
1749                    if ((value != null))
1750                    {
1751                        this.UserId = value.Id;
1752                    }
1753                    else
1754                    {
1755                        this.UserId = default(int);
1756                    }
1757                    this._user.Entity = value;
1758                    if ((value != null))
1759                    {
1760                        value.Participation.Add(this);
1761                    }
1762                    this.RaisePropertyChanged("User");
1763                }
1764            }
1765        }
1766        
1767        /// <summary>
1768        /// Gets or sets the 'UserId' value.
1769        /// </summary>
1770        [DataMember()]
1771        [RoundtripOriginal()]
1772        public int UserId
1773        {
1774            get
1775            {
1776                return this._userId;
1777            }
1778            set
1779            {
1780                if ((this._userId != value))
1781                {
1782                    this.OnUserIdChanging(value);
1783                    this.RaiseDataMemberChanging("UserId");
1784                    this.ValidateProperty("UserId", value);
1785                    this._userId = value;
1786                    this.RaiseDataMemberChanged("UserId");
1787                    this.OnUserIdChanged();
1788                }
1789            }
1790        }
1791        
1792        private void AttachAssignment(Assignment entity)
1793        {
1794            entity.Participation = this;
1795        }
1796        
1797        private void DetachAssignment(Assignment entity)
1798        {
1799            entity.Participation = null;
1800        }
1801        
1802        private bool FilterAssignment(Assignment entity)
1803        {
1804            return (entity.ParticipationId == this.Id);
1805        }
1806        
1807        private bool FilterCourse(Course entity)
1808        {
1809            return (entity.Id == this.CourseId);
1810        }
1811        
1812        private bool FilterUser(User entity)
1813        {
1814            return (entity.Id == this.UserId);
1815        }
1816        
1817        /// <summary>
1818        /// Computes a value from the key fields that uniquely identifies this entity instance.
1819        /// </summary>
1820        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
1821        public override object GetIdentity()
1822        {
1823            return this._id;
1824        }
1825    }
1826    
1827    /// <summary>
1828    /// The 'Problem' entity class.
1829    /// </summary>
1830    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
1831    public sealed partial class Problem : Entity
1832    {
1833        
1834        private EntityCollection<Assignment> _assignment;
1835        
1836        private string _filePath;
1837        
1838        private Nullable<int> _groupId;
1839        
1840        private int _id;
1841        
1842        private string _name;
1843        
1844        private EntityRef<ProblemGroup> _problemGroup;
1845        
1846        #region Extensibility Method Definitions
1847
1848        /// <summary>
1849        /// This method is invoked from the constructor once initialization is complete and
1850        /// can be used for further object setup.
1851        /// </summary>
1852        partial void OnCreated();
1853        partial void OnFilePathChanging(string value);
1854        partial void OnFilePathChanged();
1855        partial void OnGroupIdChanging(Nullable<int> value);
1856        partial void OnGroupIdChanged();
1857        partial void OnIdChanging(int value);
1858        partial void OnIdChanged();
1859        partial void OnNameChanging(string value);
1860        partial void OnNameChanged();
1861
1862        #endregion
1863        
1864        
1865        /// <summary>
1866        /// Initializes a new instance of the <see cref="Problem"/> class.
1867        /// </summary>
1868        public Problem()
1869        {
1870            this.OnCreated();
1871        }
1872        
1873        /// <summary>
1874        /// Gets the collection of associated <see cref="Assignment"/> entity instances.
1875        /// </summary>
1876        [Association("Problem_Assignment", "Id", "ProblemId")]
1877        [XmlIgnore()]
1878        public EntityCollection<Assignment> Assignment
1879        {
1880            get
1881            {
1882                if ((this._assignment == null))
1883                {
1884                    this._assignment = new EntityCollection<Assignment>(this, "Assignment", this.FilterAssignment, this.AttachAssignment, this.DetachAssignment);
1885                }
1886                return this._assignment;
1887            }
1888        }
1889        
1890        /// <summary>
1891        /// Gets or sets the 'FilePath' value.
1892        /// </summary>
1893        [DataMember()]
1894        public string FilePath
1895        {
1896            get
1897            {
1898                return this._filePath;
1899            }
1900            set
1901            {
1902                if ((this._filePath != value))
1903                {
1904                    this.OnFilePathChanging(value);
1905                    this.RaiseDataMemberChanging("FilePath");
1906                    this.ValidateProperty("FilePath", value);
1907                    this._filePath = value;
1908                    this.RaiseDataMemberChanged("FilePath");
1909                    this.OnFilePathChanged();
1910                }
1911            }
1912        }
1913        
1914        /// <summary>
1915        /// Gets or sets the 'GroupId' value.
1916        /// </summary>
1917        [DataMember()]
1918        [RoundtripOriginal()]
1919        public Nullable<int> GroupId
1920        {
1921            get
1922            {
1923                return this._groupId;
1924            }
1925            set
1926            {
1927                if ((this._groupId != value))
1928                {
1929                    this.OnGroupIdChanging(value);
1930                    this.RaiseDataMemberChanging("GroupId");
1931                    this.ValidateProperty("GroupId", value);
1932                    this._groupId = value;
1933                    this.RaiseDataMemberChanged("GroupId");
1934                    this.OnGroupIdChanged();
1935                }
1936            }
1937        }
1938        
1939        /// <summary>
1940        /// Gets or sets the 'Id' value.
1941        /// </summary>
1942        [DataMember()]
1943        [Editable(false, AllowInitialValue=true)]
1944        [Key()]
1945        [RoundtripOriginal()]
1946        public int Id
1947        {
1948            get
1949            {
1950                return this._id;
1951            }
1952            set
1953            {
1954                if ((this._id != value))
1955                {
1956                    this.OnIdChanging(value);
1957                    this.ValidateProperty("Id", value);
1958                    this._id = value;
1959                    this.RaisePropertyChanged("Id");
1960                    this.OnIdChanged();
1961                }
1962            }
1963        }
1964        
1965        /// <summary>
1966        /// Gets or sets the 'Name' value.
1967        /// </summary>
1968        [DataMember()]
1969        [Required()]
1970        public string Name
1971        {
1972            get
1973            {
1974                return this._name;
1975            }
1976            set
1977            {
1978                if ((this._name != value))
1979                {
1980                    this.OnNameChanging(value);
1981                    this.RaiseDataMemberChanging("Name");
1982                    this.ValidateProperty("Name", value);
1983                    this._name = value;
1984                    this.RaiseDataMemberChanged("Name");
1985                    this.OnNameChanged();
1986                }
1987            }
1988        }
1989        
1990        /// <summary>
1991        /// Gets or sets the associated <see cref="ProblemGroup"/> entity.
1992        /// </summary>
1993        [Association("ProblemGroup_Problem", "GroupId", "Id", IsForeignKey=true)]
1994        [XmlIgnore()]
1995        public ProblemGroup ProblemGroup
1996        {
1997            get
1998            {
1999                if ((this._problemGroup == null))
2000                {
2001                    this._problemGroup = new EntityRef<ProblemGroup>(this, "ProblemGroup", this.FilterProblemGroup);
2002                }
2003                return this._problemGroup.Entity;
2004            }
2005            set
2006            {
2007                ProblemGroup previous = this.ProblemGroup;
2008                if ((previous != value))
2009                {
2010                    this.ValidateProperty("ProblemGroup", value);
2011                    if ((previous != null))
2012                    {
2013                        this._problemGroup.Entity = null;
2014                        previous.Problem.Remove(this);
2015                    }
2016                    if ((value != null))
2017                    {
2018                        this.GroupId = value.Id;
2019                    }
2020                    else
2021                    {
2022                        this.GroupId = default(Nullable<int>);
2023                    }
2024                    this._problemGroup.Entity = value;
2025                    if ((value != null))
2026                    {
2027                        value.Problem.Add(this);
2028                    }
2029                    this.RaisePropertyChanged("ProblemGroup");
2030                }
2031            }
2032        }
2033        
2034        private void AttachAssignment(Assignment entity)
2035        {
2036            entity.Problem = this;
2037        }
2038        
2039        private void DetachAssignment(Assignment entity)
2040        {
2041            entity.Problem = null;
2042        }
2043        
2044        private bool FilterAssignment(Assignment entity)
2045        {
2046            return (entity.ProblemId == this.Id);
2047        }
2048        
2049        private bool FilterProblemGroup(ProblemGroup entity)
2050        {
2051            return (entity.Id == this.GroupId);
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 'ProblemGroup' entity class.
2066    /// </summary>
2067    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
2068    public sealed partial class ProblemGroup : Entity
2069    {
2070        
2071        private EntityCollection<ProblemGroup> _children;
2072        
2073        private int _id;
2074        
2075        private string _name;
2076        
2077        private EntityRef<ProblemGroup> _parent;
2078        
2079        private Nullable<int> _parentId;
2080        
2081        private EntityCollection<Problem> _problem;
2082        
2083        #region Extensibility Method Definitions
2084
2085        /// <summary>
2086        /// This method is invoked from the constructor once initialization is complete and
2087        /// can be used for further object setup.
2088        /// </summary>
2089        partial void OnCreated();
2090        partial void OnIdChanging(int value);
2091        partial void OnIdChanged();
2092        partial void OnNameChanging(string value);
2093        partial void OnNameChanged();
2094        partial void OnParentIdChanging(Nullable<int> value);
2095        partial void OnParentIdChanged();
2096
2097        #endregion
2098        
2099        
2100        /// <summary>
2101        /// Initializes a new instance of the <see cref="ProblemGroup"/> class.
2102        /// </summary>
2103        public ProblemGroup()
2104        {
2105            this.OnCreated();
2106        }
2107        
2108        /// <summary>
2109        /// Gets the collection of associated <see cref="ProblemGroup"/> entity instances.
2110        /// </summary>
2111        [Association("ProblemGroup_ProblemGroup", "Id", "ParentId")]
2112        [XmlIgnore()]
2113        public EntityCollection<ProblemGroup> Children
2114        {
2115            get
2116            {
2117                if ((this._children == null))
2118                {
2119                    this._children = new EntityCollection<ProblemGroup>(this, "Children", this.FilterChildren, this.AttachChildren, this.DetachChildren);
2120                }
2121                return this._children;
2122            }
2123        }
2124        
2125        /// <summary>
2126        /// Gets or sets the 'Id' value.
2127        /// </summary>
2128        [DataMember()]
2129        [Editable(false, AllowInitialValue=true)]
2130        [Key()]
2131        [RoundtripOriginal()]
2132        public int Id
2133        {
2134            get
2135            {
2136                return this._id;
2137            }
2138            set
2139            {
2140                if ((this._id != value))
2141                {
2142                    this.OnIdChanging(value);
2143                    this.ValidateProperty("Id", value);
2144                    this._id = value;
2145                    this.RaisePropertyChanged("Id");
2146                    this.OnIdChanged();
2147                }
2148            }
2149        }
2150        
2151        /// <summary>
2152        /// Gets or sets the 'Name' value.
2153        /// </summary>
2154        [DataMember()]
2155        [Required()]
2156        public string Name
2157        {
2158            get
2159            {
2160                return this._name;
2161            }
2162            set
2163            {
2164                if ((this._name != value))
2165                {
2166                    this.OnNameChanging(value);
2167                    this.RaiseDataMemberChanging("Name");
2168                    this.ValidateProperty("Name", value);
2169                    this._name = value;
2170                    this.RaiseDataMemberChanged("Name");
2171                    this.OnNameChanged();
2172                }
2173            }
2174        }
2175        
2176        /// <summary>
2177        /// Gets or sets the associated <see cref="ProblemGroup"/> entity.
2178        /// </summary>
2179        [Association("ProblemGroup_ProblemGroup", "ParentId", "Id", IsForeignKey=true)]
2180        [XmlIgnore()]
2181        public ProblemGroup Parent
2182        {
2183            get
2184            {
2185                if ((this._parent == null))
2186                {
2187                    this._parent = new EntityRef<ProblemGroup>(this, "Parent", this.FilterParent);
2188                }
2189                return this._parent.Entity;
2190            }
2191            set
2192            {
2193                ProblemGroup previous = this.Parent;
2194                if ((previous != value))
2195                {
2196                    this.ValidateProperty("Parent", value);
2197                    if ((previous != null))
2198                    {
2199                        this._parent.Entity = null;
2200                        previous.Children.Remove(this);
2201                    }
2202                    if ((value != null))
2203                    {
2204                        this.ParentId = value.Id;
2205                    }
2206                    else
2207                    {
2208                        this.ParentId = default(Nullable<int>);
2209                    }
2210                    this._parent.Entity = value;
2211                    if ((value != null))
2212                    {
2213                        value.Children.Add(this);
2214                    }
2215                    this.RaisePropertyChanged("Parent");
2216                }
2217            }
2218        }
2219        
2220        /// <summary>
2221        /// Gets or sets the 'ParentId' value.
2222        /// </summary>
2223        [DataMember()]
2224        [RoundtripOriginal()]
2225        public Nullable<int> ParentId
2226        {
2227            get
2228            {
2229                return this._parentId;
2230            }
2231            set
2232            {
2233                if ((this._parentId != value))
2234                {
2235                    this.OnParentIdChanging(value);
2236                    this.RaiseDataMemberChanging("ParentId");
2237                    this.ValidateProperty("ParentId", value);
2238                    this._parentId = value;
2239                    this.RaiseDataMemberChanged("ParentId");
2240                    this.OnParentIdChanged();
2241                }
2242            }
2243        }
2244        
2245        /// <summary>
2246        /// Gets the collection of associated <see cref="Problem"/> entity instances.
2247        /// </summary>
2248        [Association("ProblemGroup_Problem", "Id", "GroupId")]
2249        [XmlIgnore()]
2250        public EntityCollection<Problem> Problem
2251        {
2252            get
2253            {
2254                if ((this._problem == null))
2255                {
2256                    this._problem = new EntityCollection<Problem>(this, "Problem", this.FilterProblem, this.AttachProblem, this.DetachProblem);
2257                }
2258                return this._problem;
2259            }
2260        }
2261        
2262        private void AttachChildren(ProblemGroup entity)
2263        {
2264            entity.Parent = this;
2265        }
2266        
2267        private void DetachChildren(ProblemGroup entity)
2268        {
2269            entity.Parent = null;
2270        }
2271        
2272        private bool FilterChildren(ProblemGroup entity)
2273        {
2274            return (entity.ParentId == this.Id);
2275        }
2276        
2277        private bool FilterParent(ProblemGroup entity)
2278        {
2279            return (entity.Id == this.ParentId);
2280        }
2281        
2282        private void AttachProblem(Problem entity)
2283        {
2284            entity.ProblemGroup = this;
2285        }
2286        
2287        private void DetachProblem(Problem entity)
2288        {
2289            entity.ProblemGroup = null;
2290        }
2291        
2292        private bool FilterProblem(Problem entity)
2293        {
2294            return (entity.GroupId == this.Id);
2295        }
2296        
2297        /// <summary>
2298        /// Computes a value from the key fields that uniquely identifies this entity instance.
2299        /// </summary>
2300        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
2301        public override object GetIdentity()
2302        {
2303            return this._id;
2304        }
2305    }
2306    
2307    /// <summary>
2308    /// The 'Submission' entity class.
2309    /// </summary>
2310    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
2311    public sealed partial class Submission : Entity
2312    {
2313        
2314        private EntityRef<Assignment> _assignment;
2315        
2316        private int _assignmentId;
2317        
2318        private string _filePath;
2319        
2320        private int _id;
2321        
2322        private string _lang;
2323        
2324        private string _result;
2325        
2326        private DateTime _time;
2327        
2328        #region Extensibility Method Definitions
2329
2330        /// <summary>
2331        /// This method is invoked from the constructor once initialization is complete and
2332        /// can be used for further object setup.
2333        /// </summary>
2334        partial void OnCreated();
2335        partial void OnAssignmentIdChanging(int value);
2336        partial void OnAssignmentIdChanged();
2337        partial void OnFilePathChanging(string value);
2338        partial void OnFilePathChanged();
2339        partial void OnIdChanging(int value);
2340        partial void OnIdChanged();
2341        partial void OnLangChanging(string value);
2342        partial void OnLangChanged();
2343        partial void OnResultChanging(string value);
2344        partial void OnResultChanged();
2345        partial void OnTimeChanging(DateTime value);
2346        partial void OnTimeChanged();
2347
2348        #endregion
2349        
2350        
2351        /// <summary>
2352        /// Initializes a new instance of the <see cref="Submission"/> class.
2353        /// </summary>
2354        public Submission()
2355        {
2356            this.OnCreated();
2357        }
2358        
2359        /// <summary>
2360        /// Gets or sets the associated <see cref="Assignment"/> entity.
2361        /// </summary>
2362        [Association("Assignment_Submission", "AssignmentId", "Id", IsForeignKey=true)]
2363        [XmlIgnore()]
2364        public Assignment Assignment
2365        {
2366            get
2367            {
2368                if ((this._assignment == null))
2369                {
2370                    this._assignment = new EntityRef<Assignment>(this, "Assignment", this.FilterAssignment);
2371                }
2372                return this._assignment.Entity;
2373            }
2374            set
2375            {
2376                Assignment previous = this.Assignment;
2377                if ((previous != value))
2378                {
2379                    this.ValidateProperty("Assignment", value);
2380                    if ((previous != null))
2381                    {
2382                        this._assignment.Entity = null;
2383                        previous.Submission.Remove(this);
2384                    }
2385                    if ((value != null))
2386                    {
2387                        this.AssignmentId = value.Id;
2388                    }
2389                    else
2390                    {
2391                        this.AssignmentId = default(int);
2392                    }
2393                    this._assignment.Entity = value;
2394                    if ((value != null))
2395                    {
2396                        value.Submission.Add(this);
2397                    }
2398                    this.RaisePropertyChanged("Assignment");
2399                }
2400            }
2401        }
2402        
2403        /// <summary>
2404        /// Gets or sets the 'AssignmentId' value.
2405        /// </summary>
2406        [DataMember()]
2407        [RoundtripOriginal()]
2408        public int AssignmentId
2409        {
2410            get
2411            {
2412                return this._assignmentId;
2413            }
2414            set
2415            {
2416                if ((this._assignmentId != value))
2417                {
2418                    this.OnAssignmentIdChanging(value);
2419                    this.RaiseDataMemberChanging("AssignmentId");
2420                    this.ValidateProperty("AssignmentId", value);
2421                    this._assignmentId = value;
2422                    this.RaiseDataMemberChanged("AssignmentId");
2423                    this.OnAssignmentIdChanged();
2424                }
2425            }
2426        }
2427        
2428        /// <summary>
2429        /// Gets or sets the 'FilePath' value.
2430        /// </summary>
2431        [DataMember()]
2432        public string FilePath
2433        {
2434            get
2435            {
2436                return this._filePath;
2437            }
2438            set
2439            {
2440                if ((this._filePath != value))
2441                {
2442                    this.OnFilePathChanging(value);
2443                    this.RaiseDataMemberChanging("FilePath");
2444                    this.ValidateProperty("FilePath", value);
2445                    this._filePath = value;
2446                    this.RaiseDataMemberChanged("FilePath");
2447                    this.OnFilePathChanged();
2448                }
2449            }
2450        }
2451        
2452        /// <summary>
2453        /// Gets or sets the 'Id' value.
2454        /// </summary>
2455        [DataMember()]
2456        [Editable(false, AllowInitialValue=true)]
2457        [Key()]
2458        [RoundtripOriginal()]
2459        public int Id
2460        {
2461            get
2462            {
2463                return this._id;
2464            }
2465            set
2466            {
2467                if ((this._id != value))
2468                {
2469                    this.OnIdChanging(value);
2470                    this.ValidateProperty("Id", value);
2471                    this._id = value;
2472                    this.RaisePropertyChanged("Id");
2473                    this.OnIdChanged();
2474                }
2475            }
2476        }
2477        
2478        /// <summary>
2479        /// Gets or sets the 'Lang' value.
2480        /// </summary>
2481        [DataMember()]
2482        public string Lang
2483        {
2484            get
2485            {
2486                return this._lang;
2487            }
2488            set
2489            {
2490                if ((this._lang != value))
2491                {
2492                    this.OnLangChanging(value);
2493                    this.RaiseDataMemberChanging("Lang");
2494                    this.ValidateProperty("Lang", value);
2495                    this._lang = value;
2496                    this.RaiseDataMemberChanged("Lang");
2497                    this.OnLangChanged();
2498                }
2499            }
2500        }
2501        
2502        /// <summary>
2503        /// Gets or sets the 'Result' value.
2504        /// </summary>
2505        [DataMember()]
2506        [Required()]
2507        public string Result
2508        {
2509            get
2510            {
2511                return this._result;
2512            }
2513            set
2514            {
2515                if ((this._result != value))
2516                {
2517                    this.OnResultChanging(value);
2518                    this.RaiseDataMemberChanging("Result");
2519                    this.ValidateProperty("Result", value);
2520                    this._result = value;
2521                    this.RaiseDataMemberChanged("Result");
2522                    this.OnResultChanged();
2523                }
2524            }
2525        }
2526        
2527        /// <summary>
2528        /// Gets or sets the 'Time' value.
2529        /// </summary>
2530        [DataMember()]
2531        public DateTime Time
2532        {
2533            get
2534            {
2535                return this._time;
2536            }
2537            set
2538            {
2539                if ((this._time != value))
2540                {
2541                    this.OnTimeChanging(value);
2542                    this.RaiseDataMemberChanging("Time");
2543                    this.ValidateProperty("Time", value);
2544                    this._time = value;
2545                    this.RaiseDataMemberChanged("Time");
2546                    this.OnTimeChanged();
2547                }
2548            }
2549        }
2550        
2551        private bool FilterAssignment(Assignment entity)
2552        {
2553            return (entity.Id == this.AssignmentId);
2554        }
2555        
2556        /// <summary>
2557        /// Computes a value from the key fields that uniquely identifies this entity instance.
2558        /// </summary>
2559        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
2560        public override object GetIdentity()
2561        {
2562            return this._id;
2563        }
2564    }
2565    
2566    /// <summary>
2567    /// The 'User' entity class.
2568    /// </summary>
2569    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web")]
2570    public sealed partial class User : Entity
2571    {
2572        
2573        private int _id;
2574        
2575        private EntityCollection<Membership> _membership;
2576        
2577        private string _name;
2578        
2579        private EntityCollection<Participation> _participation;
2580        
2581        private string _password;
2582        
2583        #region Extensibility Method Definitions
2584
2585        /// <summary>
2586        /// This method is invoked from the constructor once initialization is complete and
2587        /// can be used for further object setup.
2588        /// </summary>
2589        partial void OnCreated();
2590        partial void OnIdChanging(int value);
2591        partial void OnIdChanged();
2592        partial void OnNameChanging(string value);
2593        partial void OnNameChanged();
2594        partial void OnPasswordChanging(string value);
2595        partial void OnPasswordChanged();
2596
2597        #endregion
2598        
2599        
2600        /// <summary>
2601        /// Initializes a new instance of the <see cref="User"/> class.
2602        /// </summary>
2603        public User()
2604        {
2605            this.OnCreated();
2606        }
2607        
2608        /// <summary>
2609        /// Gets or sets the 'Id' value.
2610        /// </summary>
2611        [DataMember()]
2612        [Editable(false, AllowInitialValue=true)]
2613        [Key()]
2614        [RoundtripOriginal()]
2615        public int Id
2616        {
2617            get
2618            {
2619                return this._id;
2620            }
2621            set
2622            {
2623                if ((this._id != value))
2624                {
2625                    this.OnIdChanging(value);
2626                    this.ValidateProperty("Id", value);
2627                    this._id = value;
2628                    this.RaisePropertyChanged("Id");
2629                    this.OnIdChanged();
2630                }
2631            }
2632        }
2633        
2634        /// <summary>
2635        /// Gets the collection of associated <see cref="Membership"/> entity instances.
2636        /// </summary>
2637        [Association("User_Membership", "Id", "UserId")]
2638        [XmlIgnore()]
2639        public EntityCollection<Membership> Membership
2640        {
2641            get
2642            {
2643                if ((this._membership == null))
2644                {
2645                    this._membership = new EntityCollection<Membership>(this, "Membership", this.FilterMembership, this.AttachMembership, this.DetachMembership);
2646                }
2647                return this._membership;
2648            }
2649        }
2650        
2651        /// <summary>
2652        /// Gets or sets the 'Name' value.
2653        /// </summary>
2654        [DataMember()]
2655        [Required()]
2656        public string Name
2657        {
2658            get
2659            {
2660                return this._name;
2661            }
2662            set
2663            {
2664                if ((this._name != value))
2665                {
2666                    this.OnNameChanging(value);
2667                    this.RaiseDataMemberChanging("Name");
2668                    this.ValidateProperty("Name", value);
2669                    this._name = value;
2670                    this.RaiseDataMemberChanged("Name");
2671                    this.OnNameChanged();
2672                }
2673            }
2674        }
2675        
2676        /// <summary>
2677        /// Gets the collection of associated <see cref="Participation"/> entity instances.
2678        /// </summary>
2679        [Association("User_Participation", "Id", "UserId")]
2680        [XmlIgnore()]
2681        public EntityCollection<Participation> Participation
2682        {
2683            get
2684            {
2685                if ((this._participation == null))
2686                {
2687                    this._participation = new EntityCollection<Participation>(this, "Participation", this.FilterParticipation, this.AttachParticipation, this.DetachParticipation);
2688                }
2689                return this._participation;
2690            }
2691        }
2692        
2693        /// <summary>
2694        /// Gets or sets the 'Password' value.
2695        /// </summary>
2696        [DataMember()]
2697        [Required()]
2698        public string Password
2699        {
2700            get
2701            {
2702                return this._password;
2703            }
2704            set
2705            {
2706                if ((this._password != value))
2707                {
2708                    this.OnPasswordChanging(value);
2709                    this.RaiseDataMemberChanging("Password");
2710                    this.ValidateProperty("Password", value);
2711                    this._password = value;
2712                    this.RaiseDataMemberChanged("Password");
2713                    this.OnPasswordChanged();
2714                }
2715            }
2716        }
2717        
2718        private void AttachMembership(Membership entity)
2719        {
2720            entity.User = this;
2721        }
2722        
2723        private void DetachMembership(Membership entity)
2724        {
2725            entity.User = null;
2726        }
2727        
2728        private bool FilterMembership(Membership entity)
2729        {
2730            return (entity.UserId == this.Id);
2731        }
2732        
2733        private void AttachParticipation(Participation entity)
2734        {
2735            entity.User = this;
2736        }
2737        
2738        private void DetachParticipation(Participation entity)
2739        {
2740            entity.User = null;
2741        }
2742        
2743        private bool FilterParticipation(Participation entity)
2744        {
2745            return (entity.UserId == this.Id);
2746        }
2747        
2748        /// <summary>
2749        /// Computes a value from the key fields that uniquely identifies this entity instance.
2750        /// </summary>
2751        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
2752        public override object GetIdentity()
2753        {
2754            return this._id;
2755        }
2756    }
2757}
2758namespace glados.Web.Logic
2759{
2760    using System;
2761    using System.Collections.Generic;
2762    using System.ComponentModel;
2763    using System.ComponentModel.DataAnnotations;
2764    using System.Linq;
2765    using System.Runtime.Serialization;
2766    using System.ServiceModel.DomainServices;
2767    using System.ServiceModel.DomainServices.Client;
2768    using System.ServiceModel.DomainServices.Client.ApplicationServices;
2769    
2770    
2771    /// <summary>
2772    /// The 'CourseTopic' class.
2773    /// </summary>
2774    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Logic")]
2775    public sealed partial class CourseTopic : ComplexObject
2776    {
2777        
2778        #region Extensibility Method Definitions
2779
2780        /// <summary>
2781        /// This method is invoked from the constructor once initialization is complete and
2782        /// can be used for further object setup.
2783        /// </summary>
2784        partial void OnCreated();
2785
2786        #endregion
2787        
2788        
2789        /// <summary>
2790        /// Initializes a new instance of the <see cref="CourseTopic"/> class.
2791        /// </summary>
2792        public CourseTopic()
2793        {
2794            this.OnCreated();
2795        }
2796    }
2797}
2798namespace glados.Web.Logic.Base
2799{
2800    using System;
2801    using System.Collections.Generic;
2802    using System.ComponentModel;
2803    using System.ComponentModel.DataAnnotations;
2804    using System.Linq;
2805    using System.Runtime.Serialization;
2806    using System.ServiceModel.DomainServices;
2807    using System.ServiceModel.DomainServices.Client;
2808    using System.ServiceModel.DomainServices.Client.ApplicationServices;
2809    
2810    
2811    /// <summary>
2812    /// The 'ParticipantState' class.
2813    /// </summary>
2814    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Logic.Base")]
2815    public sealed partial class ParticipantState : ComplexObject
2816    {
2817        
2818        #region Extensibility Method Definitions
2819
2820        /// <summary>
2821        /// This method is invoked from the constructor once initialization is complete and
2822        /// can be used for further object setup.
2823        /// </summary>
2824        partial void OnCreated();
2825
2826        #endregion
2827        
2828        
2829        /// <summary>
2830        /// Initializes a new instance of the <see cref="ParticipantState"/> class.
2831        /// </summary>
2832        public ParticipantState()
2833        {
2834            this.OnCreated();
2835        }
2836    }
2837}
2838namespace glados.Web.Services
2839{
2840    using System;
2841    using System.Collections.Generic;
2842    using System.ComponentModel;
2843    using System.ComponentModel.DataAnnotations;
2844    using System.Linq;
2845    using System.ServiceModel;
2846    using System.ServiceModel.DomainServices;
2847    using System.ServiceModel.DomainServices.Client;
2848    using System.ServiceModel.DomainServices.Client.ApplicationServices;
2849    using System.ServiceModel.Web;
2850    using glados.Web;
2851    using glados.Web.Services.Entities;
2852    
2853    
2854    /// <summary>
2855    /// The DomainContext corresponding to the 'MessageService' DomainService.
2856    /// </summary>
2857    public sealed partial class MessageContext : DomainContext
2858    {
2859        
2860        #region Extensibility Method Definitions
2861
2862        /// <summary>
2863        /// This method is invoked from the constructor once initialization is complete and
2864        /// can be used for further object setup.
2865        /// </summary>
2866        partial void OnCreated();
2867
2868        #endregion
2869        
2870        
2871        /// <summary>
2872        /// Initializes a new instance of the <see cref="MessageContext"/> class.
2873        /// </summary>
2874        public MessageContext() : 
2875                this(new WebDomainClient<IMessageServiceContract>(new Uri("glados-Web-Services-MessageService.svc", UriKind.Relative)))
2876        {
2877        }
2878        
2879        /// <summary>
2880        /// Initializes a new instance of the <see cref="MessageContext"/> class with the specified service URI.
2881        /// </summary>
2882        /// <param name="serviceUri">The MessageService service URI.</param>
2883        public MessageContext(Uri serviceUri) : 
2884                this(new WebDomainClient<IMessageServiceContract>(serviceUri))
2885        {
2886        }
2887        
2888        /// <summary>
2889        /// Initializes a new instance of the <see cref="MessageContext"/> class with the specified <paramref name="domainClient"/>.
2890        /// </summary>
2891        /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
2892        public MessageContext(DomainClient domainClient) : 
2893                base(domainClient)
2894        {
2895            this.OnCreated();
2896        }
2897        
2898        /// <summary>
2899        /// Gets the set of <see cref="Message"/> entity instances that have been loaded into this <see cref="MessageContext"/> instance.
2900        /// </summary>
2901        public EntitySet<Message> Messages
2902        {
2903            get
2904            {
2905                return base.EntityContainer.GetEntitySet<Message>();
2906            }
2907        }
2908        
2909        /// <summary>
2910        /// Gets an EntityQuery instance that can be used to load <see cref="Message"/> entity instances using the 'GetMessageById' query.
2911        /// </summary>
2912        /// <param name="id">The value for the 'id' parameter of the query.</param>
2913        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Message"/> entity instances.</returns>
2914        public EntityQuery<Message> GetMessageByIdQuery(int id)
2915        {
2916            Dictionary<string, object> parameters = new Dictionary<string, object>();
2917            parameters.Add("id", id);
2918            this.ValidateMethod("GetMessageByIdQuery", parameters);
2919            return base.CreateQuery<Message>("GetMessageById", parameters, false, false);
2920        }
2921        
2922        /// <summary>
2923        /// Gets an EntityQuery instance that can be used to load <see cref="Message"/> entity instances using the 'GetMessages' query.
2924        /// </summary>
2925        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Message"/> entity instances.</returns>
2926        public EntityQuery<Message> GetMessagesQuery()
2927        {
2928            this.ValidateMethod("GetMessagesQuery", null);
2929            return base.CreateQuery<Message>("GetMessages", null, false, true);
2930        }
2931        
2932        /// <summary>
2933        /// Gets an EntityQuery instance that can be used to load <see cref="Message"/> entity instances using the 'GetMyReceivedMessages' query.
2934        /// </summary>
2935        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Message"/> entity instances.</returns>
2936        public EntityQuery<Message> GetMyReceivedMessagesQuery()
2937        {
2938            this.ValidateMethod("GetMyReceivedMessagesQuery", null);
2939            return base.CreateQuery<Message>("GetMyReceivedMessages", null, false, true);
2940        }
2941        
2942        /// <summary>
2943        /// Gets an EntityQuery instance that can be used to load <see cref="Message"/> entity instances using the 'GetMySentMessages' query.
2944        /// </summary>
2945        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Message"/> entity instances.</returns>
2946        public EntityQuery<Message> GetMySentMessagesQuery()
2947        {
2948            this.ValidateMethod("GetMySentMessagesQuery", null);
2949            return base.CreateQuery<Message>("GetMySentMessages", null, false, true);
2950        }
2951        
2952        /// <summary>
2953        /// Creates a new EntityContainer for this DomainContext's EntitySets.
2954        /// </summary>
2955        /// <returns>A new container instance.</returns>
2956        protected override EntityContainer CreateEntityContainer()
2957        {
2958            return new MessageContextEntityContainer();
2959        }
2960        
2961        /// <summary>
2962        /// Service contract for the 'MessageService' DomainService.
2963        /// </summary>
2964        [ServiceContract()]
2965        public interface IMessageServiceContract
2966        {
2967            
2968            /// <summary>
2969            /// Asynchronously invokes the 'GetMessageById' operation.
2970            /// </summary>
2971            /// <param name="id">The value for the 'id' parameter of this action.</param>
2972            /// <param name="callback">Callback to invoke on completion.</param>
2973            /// <param name="asyncState">Optional state object.</param>
2974            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
2975            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/MessageService/GetMessageByIdDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
2976            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/MessageService/GetMessageById", ReplyAction="http://tempuri.org/MessageService/GetMessageByIdResponse")]
2977            [WebGet()]
2978            IAsyncResult BeginGetMessageById(int id, AsyncCallback callback, object asyncState);
2979            
2980            /// <summary>
2981            /// Completes the asynchronous operation begun by 'BeginGetMessageById'.
2982            /// </summary>
2983            /// <param name="result">The IAsyncResult returned from 'BeginGetMessageById'.</param>
2984            /// <returns>The 'QueryResult' returned from the 'GetMessageById' operation.</returns>
2985            QueryResult<Message> EndGetMessageById(IAsyncResult result);
2986            
2987            /// <summary>
2988            /// Asynchronously invokes the 'GetMessages' operation.
2989            /// </summary>
2990            /// <param name="callback">Callback to invoke on completion.</param>
2991            /// <param name="asyncState">Optional state object.</param>
2992            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
2993            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/MessageService/GetMessagesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
2994            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/MessageService/GetMessages", ReplyAction="http://tempuri.org/MessageService/GetMessagesResponse")]
2995            [WebGet()]
2996            IAsyncResult BeginGetMessages(AsyncCallback callback, object asyncState);
2997            
2998            /// <summary>
2999            /// Completes the asynchronous operation begun by 'BeginGetMessages'.
3000            /// </summary>
3001            /// <param name="result">The IAsyncResult returned from 'BeginGetMessages'.</param>
3002            /// <returns>The 'QueryResult' returned from the 'GetMessages' operation.</returns>
3003            QueryResult<Message> EndGetMessages(IAsyncResult result);
3004            
3005            /// <summary>
3006            /// Asynchronously invokes the 'GetMyReceivedMessages' operation.
3007            /// </summary>
3008            /// <param name="callback">Callback to invoke on completion.</param>
3009            /// <param name="asyncState">Optional state object.</param>
3010            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3011            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/MessageService/GetMyReceivedMessagesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3012            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/MessageService/GetMyReceivedMessages", ReplyAction="http://tempuri.org/MessageService/GetMyReceivedMessagesResponse")]
3013            [WebGet()]
3014            IAsyncResult BeginGetMyReceivedMessages(AsyncCallback callback, object asyncState);
3015            
3016            /// <summary>
3017            /// Completes the asynchronous operation begun by 'BeginGetMyReceivedMessages'.
3018            /// </summary>
3019            /// <param name="result">The IAsyncResult returned from 'BeginGetMyReceivedMessages'.</param>
3020            /// <returns>The 'QueryResult' returned from the 'GetMyReceivedMessages' operation.</returns>
3021            QueryResult<Message> EndGetMyReceivedMessages(IAsyncResult result);
3022            
3023            /// <summary>
3024            /// Asynchronously invokes the 'GetMySentMessages' operation.
3025            /// </summary>
3026            /// <param name="callback">Callback to invoke on completion.</param>
3027            /// <param name="asyncState">Optional state object.</param>
3028            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3029            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/MessageService/GetMySentMessagesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3030            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/MessageService/GetMySentMessages", ReplyAction="http://tempuri.org/MessageService/GetMySentMessagesResponse")]
3031            [WebGet()]
3032            IAsyncResult BeginGetMySentMessages(AsyncCallback callback, object asyncState);
3033            
3034            /// <summary>
3035            /// Completes the asynchronous operation begun by 'BeginGetMySentMessages'.
3036            /// </summary>
3037            /// <param name="result">The IAsyncResult returned from 'BeginGetMySentMessages'.</param>
3038            /// <returns>The 'QueryResult' returned from the 'GetMySentMessages' operation.</returns>
3039            QueryResult<Message> EndGetMySentMessages(IAsyncResult result);
3040            
3041            /// <summary>
3042            /// Asynchronously invokes the 'SubmitChanges' operation.
3043            /// </summary>
3044            /// <param name="changeSet">The change-set to submit.</param>
3045            /// <param name="callback">Callback to invoke on completion.</param>
3046            /// <param name="asyncState">Optional state object.</param>
3047            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3048            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/MessageService/SubmitChangesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3049            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/MessageService/SubmitChanges", ReplyAction="http://tempuri.org/MessageService/SubmitChangesResponse")]
3050            IAsyncResult BeginSubmitChanges(IEnumerable<ChangeSetEntry> changeSet, AsyncCallback callback, object asyncState);
3051            
3052            /// <summary>
3053            /// Completes the asynchronous operation begun by 'BeginSubmitChanges'.
3054            /// </summary>
3055            /// <param name="result">The IAsyncResult returned from 'BeginSubmitChanges'.</param>
3056            /// <returns>The collection of change-set entry elements returned from 'SubmitChanges'.</returns>
3057            IEnumerable<ChangeSetEntry> EndSubmitChanges(IAsyncResult result);
3058        }
3059        
3060        internal sealed class MessageContextEntityContainer : EntityContainer
3061        {
3062            
3063            public MessageContextEntityContainer()
3064            {
3065                this.CreateEntitySet<Message>(EntitySetOperations.All);
3066            }
3067        }
3068    }
3069    
3070    /// <summary>
3071    /// The DomainContext corresponding to the 'StatusService' DomainService.
3072    /// </summary>
3073    public sealed partial class StatusContext : DomainContext
3074    {
3075        
3076        #region Extensibility Method Definitions
3077
3078        /// <summary>
3079        /// This method is invoked from the constructor once initialization is complete and
3080        /// can be used for further object setup.
3081        /// </summary>
3082        partial void OnCreated();
3083
3084        #endregion
3085        
3086        
3087        /// <summary>
3088        /// Initializes a new instance of the <see cref="StatusContext"/> class.
3089        /// </summary>
3090        public StatusContext() : 
3091                this(new WebDomainClient<IStatusServiceContract>(new Uri("glados-Web-Services-StatusService.svc", UriKind.Relative)))
3092        {
3093        }
3094        
3095        /// <summary>
3096        /// Initializes a new instance of the <see cref="StatusContext"/> class with the specified service URI.
3097        /// </summary>
3098        /// <param name="serviceUri">The StatusService service URI.</param>
3099        public StatusContext(Uri serviceUri) : 
3100                this(new WebDomainClient<IStatusServiceContract>(serviceUri))
3101        {
3102        }
3103        
3104        /// <summary>
3105        /// Initializes a new instance of the <see cref="StatusContext"/> class with the specified <paramref name="domainClient"/>.
3106        /// </summary>
3107        /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
3108        public StatusContext(DomainClient domainClient) : 
3109                base(domainClient)
3110        {
3111            this.OnCreated();
3112        }
3113        
3114        /// <summary>
3115        /// Gets the set of <see cref="TestingMachineEntity"/> entity instances that have been loaded into this <see cref="StatusContext"/> instance.
3116        /// </summary>
3117        public EntitySet<TestingMachineEntity> TestingMachineEntities
3118        {
3119            get
3120            {
3121                return base.EntityContainer.GetEntitySet<TestingMachineEntity>();
3122            }
3123        }
3124        
3125        /// <summary>
3126        /// Gets an EntityQuery instance that can be used to load <see cref="TestingMachineEntity"/> entity instances using the 'GetTesterStatus' query.
3127        /// </summary>
3128        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="TestingMachineEntity"/> entity instances.</returns>
3129        public EntityQuery<TestingMachineEntity> GetTesterStatusQuery()
3130        {
3131            this.ValidateMethod("GetTesterStatusQuery", null);
3132            return base.CreateQuery<TestingMachineEntity>("GetTesterStatus", null, false, true);
3133        }
3134        
3135        /// <summary>
3136        /// Asynchronously invokes the 'ReloadProblemsIntoDb' method of the DomainService.
3137        /// </summary>
3138        /// <param name="callback">Callback to invoke when the operation completes.</param>
3139        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
3140        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
3141        public InvokeOperation ReloadProblemsIntoDb(Action<InvokeOperation> callback, object userState)
3142        {
3143            this.ValidateMethod("ReloadProblemsIntoDb", null);
3144            return this.InvokeOperation("ReloadProblemsIntoDb", typeof(void), null, true, callback, userState);
3145        }
3146        
3147        /// <summary>
3148        /// Asynchronously invokes the 'ReloadProblemsIntoDb' method of the DomainService.
3149        /// </summary>
3150        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
3151        public InvokeOperation ReloadProblemsIntoDb()
3152        {
3153            this.ValidateMethod("ReloadProblemsIntoDb", null);
3154            return this.InvokeOperation("ReloadProblemsIntoDb", typeof(void), null, true, null, null);
3155        }
3156        
3157        /// <summary>
3158        /// Asynchronously invokes the 'RetestSubmission' method of the DomainService.
3159        /// </summary>
3160        /// <param name="id">The value for the 'id' parameter of this action.</param>
3161        /// <param name="callback">Callback to invoke when the operation completes.</param>
3162        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
3163        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
3164        public InvokeOperation RetestSubmission(int id, Action<InvokeOperation> callback, object userState)
3165        {
3166            Dictionary<string, object> parameters = new Dictionary<string, object>();
3167            parameters.Add("id", id);
3168            this.ValidateMethod("RetestSubmission", parameters);
3169            return this.InvokeOperation("RetestSubmission", typeof(void), parameters, true, callback, userState);
3170        }
3171        
3172        /// <summary>
3173        /// Asynchronously invokes the 'RetestSubmission' method of the DomainService.
3174        /// </summary>
3175        /// <param name="id">The value for the 'id' parameter of this action.</param>
3176        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
3177        public InvokeOperation RetestSubmission(int id)
3178        {
3179            Dictionary<string, object> parameters = new Dictionary<string, object>();
3180            parameters.Add("id", id);
3181            this.ValidateMethod("RetestSubmission", parameters);
3182            return this.InvokeOperation("RetestSubmission", typeof(void), parameters, true, null, null);
3183        }
3184        
3185        /// <summary>
3186        /// Creates a new EntityContainer for this DomainContext's EntitySets.
3187        /// </summary>
3188        /// <returns>A new container instance.</returns>
3189        protected override EntityContainer CreateEntityContainer()
3190        {
3191            return new StatusContextEntityContainer();
3192        }
3193        
3194        /// <summary>
3195        /// Service contract for the 'StatusService' DomainService.
3196        /// </summary>
3197        [ServiceContract()]
3198        public interface IStatusServiceContract
3199        {
3200            
3201            /// <summary>
3202            /// Asynchronously invokes the 'GetTesterStatus' operation.
3203            /// </summary>
3204            /// <param name="callback">Callback to invoke on completion.</param>
3205            /// <param name="asyncState">Optional state object.</param>
3206            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3207            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/StatusService/GetTesterStatusDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3208            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/StatusService/GetTesterStatus", ReplyAction="http://tempuri.org/StatusService/GetTesterStatusResponse")]
3209            [WebGet()]
3210            IAsyncResult BeginGetTesterStatus(AsyncCallback callback, object asyncState);
3211            
3212            /// <summary>
3213            /// Completes the asynchronous operation begun by 'BeginGetTesterStatus'.
3214            /// </summary>
3215            /// <param name="result">The IAsyncResult returned from 'BeginGetTesterStatus'.</param>
3216            /// <returns>The 'QueryResult' returned from the 'GetTesterStatus' operation.</returns>
3217            QueryResult<TestingMachineEntity> EndGetTesterStatus(IAsyncResult result);
3218            
3219            /// <summary>
3220            /// Asynchronously invokes the 'ReloadProblemsIntoDb' operation.
3221            /// </summary>
3222            /// <param name="callback">Callback to invoke on completion.</param>
3223            /// <param name="asyncState">Optional state object.</param>
3224            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3225            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/StatusService/ReloadProblemsIntoDbDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3226            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/StatusService/ReloadProblemsIntoDb", ReplyAction="http://tempuri.org/StatusService/ReloadProblemsIntoDbResponse")]
3227            IAsyncResult BeginReloadProblemsIntoDb(AsyncCallback callback, object asyncState);
3228            
3229            /// <summary>
3230            /// Completes the asynchronous operation begun by 'BeginReloadProblemsIntoDb'.
3231            /// </summary>
3232            /// <param name="result">The IAsyncResult returned from 'BeginReloadProblemsIntoDb'.</param>
3233            void EndReloadProblemsIntoDb(IAsyncResult result);
3234            
3235            /// <summary>
3236            /// Asynchronously invokes the 'RetestSubmission' operation.
3237            /// </summary>
3238            /// <param name="id">The value for the 'id' parameter of this action.</param>
3239            /// <param name="callback">Callback to invoke on completion.</param>
3240            /// <param name="asyncState">Optional state object.</param>
3241            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3242            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/StatusService/RetestSubmissionDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3243            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/StatusService/RetestSubmission", ReplyAction="http://tempuri.org/StatusService/RetestSubmissionResponse")]
3244            IAsyncResult BeginRetestSubmission(int id, AsyncCallback callback, object asyncState);
3245            
3246            /// <summary>
3247            /// Completes the asynchronous operation begun by 'BeginRetestSubmission'.
3248            /// </summary>
3249            /// <param name="result">The IAsyncResult returned from 'BeginRetestSubmission'.</param>
3250            void EndRetestSubmission(IAsyncResult result);
3251        }
3252        
3253        internal sealed class StatusContextEntityContainer : EntityContainer
3254        {
3255            
3256            public StatusContextEntityContainer()
3257            {
3258                this.CreateEntitySet<TestingMachineEntity>(EntitySetOperations.None);
3259            }
3260        }
3261    }
3262    
3263    /// <summary>
3264    /// The DomainContext corresponding to the 'TaskStructureService' DomainService.
3265    /// </summary>
3266    public sealed partial class TaskStructureContext : DomainContext
3267    {
3268        
3269        #region Extensibility Method Definitions
3270
3271        /// <summary>
3272        /// This method is invoked from the constructor once initialization is complete and
3273        /// can be used for further object setup.
3274        /// </summary>
3275        partial void OnCreated();
3276
3277        #endregion
3278        
3279        
3280        /// <summary>
3281        /// Initializes a new instance of the <see cref="TaskStructureContext"/> class.
3282        /// </summary>
3283        public TaskStructureContext() : 
3284                this(new WebDomainClient<ITaskStructureServiceContract>(new Uri("glados-Web-Services-TaskStructureService.svc", UriKind.Relative)))
3285        {
3286        }
3287        
3288        /// <summary>
3289        /// Initializes a new instance of the <see cref="TaskStructureContext"/> class with the specified service URI.
3290        /// </summary>
3291        /// <param name="serviceUri">The TaskStructureService service URI.</param>
3292        public TaskStructureContext(Uri serviceUri) : 
3293                this(new WebDomainClient<ITaskStructureServiceContract>(serviceUri))
3294        {
3295        }
3296        
3297        /// <summary>
3298        /// Initializes a new instance of the <see cref="TaskStructureContext"/> class with the specified <paramref name="domainClient"/>.
3299        /// </summary>
3300        /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
3301        public TaskStructureContext(DomainClient domainClient) : 
3302                base(domainClient)
3303        {
3304            this.OnCreated();
3305        }
3306        
3307        /// <summary>
3308        /// Gets the set of <see cref="Assignment"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
3309        /// </summary>
3310        public EntitySet<Assignment> Assignments
3311        {
3312            get
3313            {
3314                return base.EntityContainer.GetEntitySet<Assignment>();
3315            }
3316        }
3317        
3318        /// <summary>
3319        /// Gets the set of <see cref="Course"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
3320        /// </summary>
3321        public EntitySet<Course> Courses
3322        {
3323            get
3324            {
3325                return base.EntityContainer.GetEntitySet<Course>();
3326            }
3327        }
3328        
3329        /// <summary>
3330        /// Gets the set of <see cref="Group"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
3331        /// </summary>
3332        public EntitySet<Group> Groups
3333        {
3334            get
3335            {
3336                return base.EntityContainer.GetEntitySet<Group>();
3337            }
3338        }
3339        
3340        /// <summary>
3341        /// Gets the set of <see cref="Membership"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
3342        /// </summary>
3343        public EntitySet<Membership> Memberships
3344        {
3345            get
3346            {
3347                return base.EntityContainer.GetEntitySet<Membership>();
3348            }
3349        }
3350        
3351        /// <summary>
3352        /// Gets the set of <see cref="Participation"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
3353        /// </summary>
3354        public EntitySet<Participation> Participations
3355        {
3356            get
3357            {
3358                return base.EntityContainer.GetEntitySet<Participation>();
3359            }
3360        }
3361        
3362        /// <summary>
3363        /// Gets the set of <see cref="ProblemGroup"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
3364        /// </summary>
3365        public EntitySet<ProblemGroup> ProblemGroups
3366        {
3367            get
3368            {
3369                return base.EntityContainer.GetEntitySet<ProblemGroup>();
3370            }
3371        }
3372        
3373        /// <summary>
3374        /// Gets the set of <see cref="Problem"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
3375        /// </summary>
3376        public EntitySet<Problem> Problems
3377        {
3378            get
3379            {
3380                return base.EntityContainer.GetEntitySet<Problem>();
3381            }
3382        }
3383        
3384        /// <summary>
3385        /// Gets the set of <see cref="Submission"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
3386        /// </summary>
3387        public EntitySet<Submission> Submissions
3388        {
3389            get
3390            {
3391                return base.EntityContainer.GetEntitySet<Submission>();
3392            }
3393        }
3394        
3395        /// <summary>
3396        /// Gets the set of <see cref="User"/> entity instances that have been loaded into this <see cref="TaskStructureContext"/> instance.
3397        /// </summary>
3398        public EntitySet<User> Users
3399        {
3400            get
3401            {
3402                return base.EntityContainer.GetEntitySet<User>();
3403            }
3404        }
3405        
3406        /// <summary>
3407        /// Gets an EntityQuery instance that can be used to load <see cref="Assignment"/> entity instances using the 'GetAssignmentSet' query.
3408        /// </summary>
3409        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Assignment"/> entity instances.</returns>
3410        public EntityQuery<Assignment> GetAssignmentSetQuery()
3411        {
3412            this.ValidateMethod("GetAssignmentSetQuery", null);
3413            return base.CreateQuery<Assignment>("GetAssignmentSet", null, false, true);
3414        }
3415        
3416        /// <summary>
3417        /// Gets an EntityQuery instance that can be used to load <see cref="Assignment"/> entity instances using the 'GetAssignmentsForMe' query.
3418        /// </summary>
3419        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Assignment"/> entity instances.</returns>
3420        public EntityQuery<Assignment> GetAssignmentsForMeQuery()
3421        {
3422            this.ValidateMethod("GetAssignmentsForMeQuery", null);
3423            return base.CreateQuery<Assignment>("GetAssignmentsForMe", null, false, true);
3424        }
3425        
3426        /// <summary>
3427        /// Gets an EntityQuery instance that can be used to load <see cref="Course"/> entity instances using the 'GetCourseSet' query.
3428        /// </summary>
3429        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Course"/> entity instances.</returns>
3430        public EntityQuery<Course> GetCourseSetQuery()
3431        {
3432            this.ValidateMethod("GetCourseSetQuery", null);
3433            return base.CreateQuery<Course>("GetCourseSet", null, false, true);
3434        }
3435        
3436        /// <summary>
3437        /// Gets an EntityQuery instance that can be used to load <see cref="Group"/> entity instances using the 'GetGroupSet' query.
3438        /// </summary>
3439        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Group"/> entity instances.</returns>
3440        public EntityQuery<Group> GetGroupSetQuery()
3441        {
3442            this.ValidateMethod("GetGroupSetQuery", null);
3443            return base.CreateQuery<Group>("GetGroupSet", null, false, true);
3444        }
3445        
3446        /// <summary>
3447        /// Gets an EntityQuery instance that can be used to load <see cref="Membership"/> entity instances using the 'GetMembershipSet' query.
3448        /// </summary>
3449        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Membership"/> entity instances.</returns>
3450        public EntityQuery<Membership> GetMembershipSetQuery()
3451        {
3452            this.ValidateMethod("GetMembershipSetQuery", null);
3453            return base.CreateQuery<Membership>("GetMembershipSet", null, false, true);
3454        }
3455        
3456        /// <summary>
3457        /// Gets an EntityQuery instance that can be used to load <see cref="Participation"/> entity instances using the 'GetParticipationSet' query.
3458        /// </summary>
3459        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Participation"/> entity instances.</returns>
3460        public EntityQuery<Participation> GetParticipationSetQuery()
3461        {
3462            this.ValidateMethod("GetParticipationSetQuery", null);
3463            return base.CreateQuery<Participation>("GetParticipationSet", null, false, true);
3464        }
3465        
3466        /// <summary>
3467        /// Gets an EntityQuery instance that can be used to load <see cref="ProblemGroup"/> entity instances using the 'GetProblemGroupSet' query.
3468        /// </summary>
3469        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="ProblemGroup"/> entity instances.</returns>
3470        public EntityQuery<ProblemGroup> GetProblemGroupSetQuery()
3471        {
3472            this.ValidateMethod("GetProblemGroupSetQuery", null);
3473            return base.CreateQuery<ProblemGroup>("GetProblemGroupSet", null, false, true);
3474        }
3475        
3476        /// <summary>
3477        /// Gets an EntityQuery instance that can be used to load <see cref="Problem"/> entity instances using the 'GetProblemSet' query.
3478        /// </summary>
3479        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Problem"/> entity instances.</returns>
3480        public EntityQuery<Problem> GetProblemSetQuery()
3481        {
3482            this.ValidateMethod("GetProblemSetQuery", null);
3483            return base.CreateQuery<Problem>("GetProblemSet", null, false, true);
3484        }
3485        
3486        /// <summary>
3487        /// Gets an EntityQuery instance that can be used to load <see cref="Problem"/> entity instances using the 'GetProblemSetByGroupId' query.
3488        /// </summary>
3489        /// <param name="id">The value for the 'id' parameter of the query.</param>
3490        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Problem"/> entity instances.</returns>
3491        public EntityQuery<Problem> GetProblemSetByGroupIdQuery(int id)
3492        {
3493            Dictionary<string, object> parameters = new Dictionary<string, object>();
3494            parameters.Add("id", id);
3495            this.ValidateMethod("GetProblemSetByGroupIdQuery", parameters);
3496            return base.CreateQuery<Problem>("GetProblemSetByGroupId", parameters, false, true);
3497        }
3498        
3499        /// <summary>
3500        /// Gets an EntityQuery instance that can be used to load <see cref="Submission"/> entity instances using the 'GetSubmissionSet' query.
3501        /// </summary>
3502        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Submission"/> entity instances.</returns>
3503        public EntityQuery<Submission> GetSubmissionSetQuery()
3504        {
3505            this.ValidateMethod("GetSubmissionSetQuery", null);
3506            return base.CreateQuery<Submission>("GetSubmissionSet", null, false, true);
3507        }
3508        
3509        /// <summary>
3510        /// Gets an EntityQuery instance that can be used to load <see cref="User"/> entity instances using the 'GetUsers' query.
3511        /// </summary>
3512        /// <returns>An EntityQuery that can be loaded to retrieve <see cref="User"/> entity instances.</returns>
3513        public EntityQuery<User> GetUsersQuery()
3514        {
3515            this.ValidateMethod("GetUsersQuery", null);
3516            return base.CreateQuery<User>("GetUsers", null, false, true);
3517        }
3518        
3519        /// <summary>
3520        /// Creates a new EntityContainer for this DomainContext's EntitySets.
3521        /// </summary>
3522        /// <returns>A new container instance.</returns>
3523        protected override EntityContainer CreateEntityContainer()
3524        {
3525            return new TaskStructureContextEntityContainer();
3526        }
3527        
3528        /// <summary>
3529        /// Service contract for the 'TaskStructureService' DomainService.
3530        /// </summary>
3531        [ServiceContract()]
3532        public interface ITaskStructureServiceContract
3533        {
3534            
3535            /// <summary>
3536            /// Asynchronously invokes the 'GetAssignmentSet' operation.
3537            /// </summary>
3538            /// <param name="callback">Callback to invoke on completion.</param>
3539            /// <param name="asyncState">Optional state object.</param>
3540            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3541            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetAssignmentSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3542            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetAssignmentSet", ReplyAction="http://tempuri.org/TaskStructureService/GetAssignmentSetResponse")]
3543            [WebGet()]
3544            IAsyncResult BeginGetAssignmentSet(AsyncCallback callback, object asyncState);
3545            
3546            /// <summary>
3547            /// Completes the asynchronous operation begun by 'BeginGetAssignmentSet'.
3548            /// </summary>
3549            /// <param name="result">The IAsyncResult returned from 'BeginGetAssignmentSet'.</param>
3550            /// <returns>The 'QueryResult' returned from the 'GetAssignmentSet' operation.</returns>
3551            QueryResult<Assignment> EndGetAssignmentSet(IAsyncResult result);
3552            
3553            /// <summary>
3554            /// Asynchronously invokes the 'GetAssignmentsForMe' operation.
3555            /// </summary>
3556            /// <param name="callback">Callback to invoke on completion.</param>
3557            /// <param name="asyncState">Optional state object.</param>
3558            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3559            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetAssignmentsForMeDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3560            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetAssignmentsForMe", ReplyAction="http://tempuri.org/TaskStructureService/GetAssignmentsForMeResponse")]
3561            [WebGet()]
3562            IAsyncResult BeginGetAssignmentsForMe(AsyncCallback callback, object asyncState);
3563            
3564            /// <summary>
3565            /// Completes the asynchronous operation begun by 'BeginGetAssignmentsForMe'.
3566            /// </summary>
3567            /// <param name="result">The IAsyncResult returned from 'BeginGetAssignmentsForMe'.</param>
3568            /// <returns>The 'QueryResult' returned from the 'GetAssignmentsForMe' operation.</returns>
3569            QueryResult<Assignment> EndGetAssignmentsForMe(IAsyncResult result);
3570            
3571            /// <summary>
3572            /// Asynchronously invokes the 'GetCourseSet' operation.
3573            /// </summary>
3574            /// <param name="callback">Callback to invoke on completion.</param>
3575            /// <param name="asyncState">Optional state object.</param>
3576            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3577            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetCourseSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3578            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetCourseSet", ReplyAction="http://tempuri.org/TaskStructureService/GetCourseSetResponse")]
3579            [WebGet()]
3580            IAsyncResult BeginGetCourseSet(AsyncCallback callback, object asyncState);
3581            
3582            /// <summary>
3583            /// Completes the asynchronous operation begun by 'BeginGetCourseSet'.
3584            /// </summary>
3585            /// <param name="result">The IAsyncResult returned from 'BeginGetCourseSet'.</param>
3586            /// <returns>The 'QueryResult' returned from the 'GetCourseSet' operation.</returns>
3587            QueryResult<Course> EndGetCourseSet(IAsyncResult result);
3588            
3589            /// <summary>
3590            /// Asynchronously invokes the 'GetGroupSet' operation.
3591            /// </summary>
3592            /// <param name="callback">Callback to invoke on completion.</param>
3593            /// <param name="asyncState">Optional state object.</param>
3594            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3595            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetGroupSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3596            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetGroupSet", ReplyAction="http://tempuri.org/TaskStructureService/GetGroupSetResponse")]
3597            [WebGet()]
3598            IAsyncResult BeginGetGroupSet(AsyncCallback callback, object asyncState);
3599            
3600            /// <summary>
3601            /// Completes the asynchronous operation begun by 'BeginGetGroupSet'.
3602            /// </summary>
3603            /// <param name="result">The IAsyncResult returned from 'BeginGetGroupSet'.</param>
3604            /// <returns>The 'QueryResult' returned from the 'GetGroupSet' operation.</returns>
3605            QueryResult<Group> EndGetGroupSet(IAsyncResult result);
3606            
3607            /// <summary>
3608            /// Asynchronously invokes the 'GetMembershipSet' operation.
3609            /// </summary>
3610            /// <param name="callback">Callback to invoke on completion.</param>
3611            /// <param name="asyncState">Optional state object.</param>
3612            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3613            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetMembershipSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3614            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetMembershipSet", ReplyAction="http://tempuri.org/TaskStructureService/GetMembershipSetResponse")]
3615            [WebGet()]
3616            IAsyncResult BeginGetMembershipSet(AsyncCallback callback, object asyncState);
3617            
3618            /// <summary>
3619            /// Completes the asynchronous operation begun by 'BeginGetMembershipSet'.
3620            /// </summary>
3621            /// <param name="result">The IAsyncResult returned from 'BeginGetMembershipSet'.</param>
3622            /// <returns>The 'QueryResult' returned from the 'GetMembershipSet' operation.</returns>
3623            QueryResult<Membership> EndGetMembershipSet(IAsyncResult result);
3624            
3625            /// <summary>
3626            /// Asynchronously invokes the 'GetParticipationSet' operation.
3627            /// </summary>
3628            /// <param name="callback">Callback to invoke on completion.</param>
3629            /// <param name="asyncState">Optional state object.</param>
3630            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3631            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetParticipationSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3632            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetParticipationSet", ReplyAction="http://tempuri.org/TaskStructureService/GetParticipationSetResponse")]
3633            [WebGet()]
3634            IAsyncResult BeginGetParticipationSet(AsyncCallback callback, object asyncState);
3635            
3636            /// <summary>
3637            /// Completes the asynchronous operation begun by 'BeginGetParticipationSet'.
3638            /// </summary>
3639            /// <param name="result">The IAsyncResult returned from 'BeginGetParticipationSet'.</param>
3640            /// <returns>The 'QueryResult' returned from the 'GetParticipationSet' operation.</returns>
3641            QueryResult<Participation> EndGetParticipationSet(IAsyncResult result);
3642            
3643            /// <summary>
3644            /// Asynchronously invokes the 'GetProblemGroupSet' operation.
3645            /// </summary>
3646            /// <param name="callback">Callback to invoke on completion.</param>
3647            /// <param name="asyncState">Optional state object.</param>
3648            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3649            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetProblemGroupSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3650            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetProblemGroupSet", ReplyAction="http://tempuri.org/TaskStructureService/GetProblemGroupSetResponse")]
3651            [WebGet()]
3652            IAsyncResult BeginGetProblemGroupSet(AsyncCallback callback, object asyncState);
3653            
3654            /// <summary>
3655            /// Completes the asynchronous operation begun by 'BeginGetProblemGroupSet'.
3656            /// </summary>
3657            /// <param name="result">The IAsyncResult returned from 'BeginGetProblemGroupSet'.</param>
3658            /// <returns>The 'QueryResult' returned from the 'GetProblemGroupSet' operation.</returns>
3659            QueryResult<ProblemGroup> EndGetProblemGroupSet(IAsyncResult result);
3660            
3661            /// <summary>
3662            /// Asynchronously invokes the 'GetProblemSet' operation.
3663            /// </summary>
3664            /// <param name="callback">Callback to invoke on completion.</param>
3665            /// <param name="asyncState">Optional state object.</param>
3666            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3667            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetProblemSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3668            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetProblemSet", ReplyAction="http://tempuri.org/TaskStructureService/GetProblemSetResponse")]
3669            [WebGet()]
3670            IAsyncResult BeginGetProblemSet(AsyncCallback callback, object asyncState);
3671            
3672            /// <summary>
3673            /// Completes the asynchronous operation begun by 'BeginGetProblemSet'.
3674            /// </summary>
3675            /// <param name="result">The IAsyncResult returned from 'BeginGetProblemSet'.</param>
3676            /// <returns>The 'QueryResult' returned from the 'GetProblemSet' operation.</returns>
3677            QueryResult<Problem> EndGetProblemSet(IAsyncResult result);
3678            
3679            /// <summary>
3680            /// Asynchronously invokes the 'GetProblemSetByGroupId' operation.
3681            /// </summary>
3682            /// <param name="id">The value for the 'id' parameter of this action.</param>
3683            /// <param name="callback">Callback to invoke on completion.</param>
3684            /// <param name="asyncState">Optional state object.</param>
3685            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3686            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetProblemSetByGroupIdDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3687            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetProblemSetByGroupId", ReplyAction="http://tempuri.org/TaskStructureService/GetProblemSetByGroupIdResponse")]
3688            [WebGet()]
3689            IAsyncResult BeginGetProblemSetByGroupId(int id, AsyncCallback callback, object asyncState);
3690            
3691            /// <summary>
3692            /// Completes the asynchronous operation begun by 'BeginGetProblemSetByGroupId'.
3693            /// </summary>
3694            /// <param name="result">The IAsyncResult returned from 'BeginGetProblemSetByGroupId'.</param>
3695            /// <returns>The 'QueryResult' returned from the 'GetProblemSetByGroupId' operation.</returns>
3696            QueryResult<Problem> EndGetProblemSetByGroupId(IAsyncResult result);
3697            
3698            /// <summary>
3699            /// Asynchronously invokes the 'GetSubmissionSet' operation.
3700            /// </summary>
3701            /// <param name="callback">Callback to invoke on completion.</param>
3702            /// <param name="asyncState">Optional state object.</param>
3703            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3704            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetSubmissionSetDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3705            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetSubmissionSet", ReplyAction="http://tempuri.org/TaskStructureService/GetSubmissionSetResponse")]
3706            [WebGet()]
3707            IAsyncResult BeginGetSubmissionSet(AsyncCallback callback, object asyncState);
3708            
3709            /// <summary>
3710            /// Completes the asynchronous operation begun by 'BeginGetSubmissionSet'.
3711            /// </summary>
3712            /// <param name="result">The IAsyncResult returned from 'BeginGetSubmissionSet'.</param>
3713            /// <returns>The 'QueryResult' returned from the 'GetSubmissionSet' operation.</returns>
3714            QueryResult<Submission> EndGetSubmissionSet(IAsyncResult result);
3715            
3716            /// <summary>
3717            /// Asynchronously invokes the 'GetUsers' operation.
3718            /// </summary>
3719            /// <param name="callback">Callback to invoke on completion.</param>
3720            /// <param name="asyncState">Optional state object.</param>
3721            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3722            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/GetUsersDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3723            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/GetUsers", ReplyAction="http://tempuri.org/TaskStructureService/GetUsersResponse")]
3724            [WebGet()]
3725            IAsyncResult BeginGetUsers(AsyncCallback callback, object asyncState);
3726            
3727            /// <summary>
3728            /// Completes the asynchronous operation begun by 'BeginGetUsers'.
3729            /// </summary>
3730            /// <param name="result">The IAsyncResult returned from 'BeginGetUsers'.</param>
3731            /// <returns>The 'QueryResult' returned from the 'GetUsers' operation.</returns>
3732            QueryResult<User> EndGetUsers(IAsyncResult result);
3733            
3734            /// <summary>
3735            /// Asynchronously invokes the 'SubmitChanges' operation.
3736            /// </summary>
3737            /// <param name="changeSet">The change-set to submit.</param>
3738            /// <param name="callback">Callback to invoke on completion.</param>
3739            /// <param name="asyncState">Optional state object.</param>
3740            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
3741            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/TaskStructureService/SubmitChangesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
3742            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/TaskStructureService/SubmitChanges", ReplyAction="http://tempuri.org/TaskStructureService/SubmitChangesResponse")]
3743            IAsyncResult BeginSubmitChanges(IEnumerable<ChangeSetEntry> changeSet, AsyncCallback callback, object asyncState);
3744            
3745            /// <summary>
3746            /// Completes the asynchronous operation begun by 'BeginSubmitChanges'.
3747            /// </summary>
3748            /// <param name="result">The IAsyncResult returned from 'BeginSubmitChanges'.</param>
3749            /// <returns>The collection of change-set entry elements returned from 'SubmitChanges'.</returns>
3750            IEnumerable<ChangeSetEntry> EndSubmitChanges(IAsyncResult result);
3751        }
3752        
3753        internal sealed class TaskStructureContextEntityContainer : EntityContainer
3754        {
3755            
3756            public TaskStructureContextEntityContainer()
3757            {
3758                this.CreateEntitySet<Assignment>(EntitySetOperations.All);
3759                this.CreateEntitySet<Course>(EntitySetOperations.All);
3760                this.CreateEntitySet<Group>(EntitySetOperations.All);
3761                this.CreateEntitySet<Membership>(EntitySetOperations.All);
3762                this.CreateEntitySet<Participation>(EntitySetOperations.All);
3763                this.CreateEntitySet<Problem>(EntitySetOperations.All);
3764                this.CreateEntitySet<ProblemGroup>(EntitySetOperations.All);
3765                this.CreateEntitySet<Submission>(EntitySetOperations.All);
3766                this.CreateEntitySet<User>(EntitySetOperations.All);
3767            }
3768        }
3769    }
3770}
3771namespace glados.Web.Services.Entities
3772{
3773    using System;
3774    using System.Collections.Generic;
3775    using System.ComponentModel;
3776    using System.ComponentModel.DataAnnotations;
3777    using System.Linq;
3778    using System.Runtime.Serialization;
3779    using System.ServiceModel.DomainServices;
3780    using System.ServiceModel.DomainServices.Client;
3781    using System.ServiceModel.DomainServices.Client.ApplicationServices;
3782    using System.Xml.Serialization;
3783    using Glados.TestingModule.Interfaces;
3784    using glados.Web.Logic;
3785    
3786    
3787    /// <summary>
3788    /// The 'AssignmentState' class.
3789    /// </summary>
3790    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
3791    public sealed partial class AssignmentState : ComplexObject
3792    {
3793        
3794        private string _state;
3795        
3796        private string _task;
3797        
3798        private string _topic;
3799        
3800        #region Extensibility Method Definitions
3801
3802        /// <summary>
3803        /// This method is invoked from the constructor once initialization is complete and
3804        /// can be used for further object setup.
3805        /// </summary>
3806        partial void OnCreated();
3807        partial void OnStateChanging(string value);
3808        partial void OnStateChanged();
3809        partial void OnTaskChanging(string value);
3810        partial void OnTaskChanged();
3811        partial void OnTopicChanging(string value);
3812        partial void OnTopicChanged();
3813
3814        #endregion
3815        
3816        
3817        /// <summary>
3818        /// Initializes a new instance of the <see cref="AssignmentState"/> class.
3819        /// </summary>
3820        public AssignmentState()
3821        {
3822            this.OnCreated();
3823        }
3824        
3825        /// <summary>
3826        /// Gets or sets the 'State' value.
3827        /// </summary>
3828        [DataMember()]
3829        public string State
3830        {
3831            get
3832            {
3833                return this._state;
3834            }
3835            set
3836            {
3837                if ((this._state != value))
3838                {
3839                    this.OnStateChanging(value);
3840                    this.RaiseDataMemberChanging("State");
3841                    this.ValidateProperty("State", value);
3842                    this._state = value;
3843                    this.RaiseDataMemberChanged("State");
3844                    this.OnStateChanged();
3845                }
3846            }
3847        }
3848        
3849        /// <summary>
3850        /// Gets or sets the 'Task' value.
3851        /// </summary>
3852        [DataMember()]
3853        public string Task
3854        {
3855            get
3856            {
3857                return this._task;
3858            }
3859            set
3860            {
3861                if ((this._task != value))
3862                {
3863                    this.OnTaskChanging(value);
3864                    this.RaiseDataMemberChanging("Task");
3865                    this.ValidateProperty("Task", value);
3866                    this._task = value;
3867                    this.RaiseDataMemberChanged("Task");
3868                    this.OnTaskChanged();
3869                }
3870            }
3871        }
3872        
3873        /// <summary>
3874        /// Gets or sets the 'Topic' value.
3875        /// </summary>
3876        [DataMember()]
3877        public string Topic
3878        {
3879            get
3880            {
3881                return this._topic;
3882            }
3883            set
3884            {
3885                if ((this._topic != value))
3886                {
3887                    this.OnTopicChanging(value);
3888                    this.RaiseDataMemberChanging("Topic");
3889                    this.ValidateProperty("Topic", value);
3890                    this._topic = value;
3891                    this.RaiseDataMemberChanged("Topic");
3892                    this.OnTopicChanged();
3893                }
3894            }
3895        }
3896    }
3897    
3898    /// <summary>
3899    /// The 'CourseDashboardInfo' class.
3900    /// </summary>
3901    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
3902    public sealed partial class CourseDashboardInfo : ComplexObject
3903    {
3904        
3905        private CourseParticipantClientState[] _participants;
3906        
3907        private CourseTopic[] _topics;
3908        
3909        #region Extensibility Method Definitions
3910
3911        /// <summary>
3912        /// This method is invoked from the constructor once initialization is complete and
3913        /// can be used for further object setup.
3914        /// </summary>
3915        partial void OnCreated();
3916        partial void OnParticipantsChanging(CourseParticipantClientState[] value);
3917        partial void OnParticipantsChanged();
3918        partial void OnTopicsChanging(CourseTopic[] value);
3919        partial void OnTopicsChanged();
3920
3921        #endregion
3922        
3923        
3924        /// <summary>
3925        /// Initializes a new instance of the <see cref="CourseDashboardInfo"/> class.
3926        /// </summary>
3927        public CourseDashboardInfo()
3928        {
3929            this.OnCreated();
3930        }
3931        
3932        /// <summary>
3933        /// Gets or sets the 'Participants' value.
3934        /// </summary>
3935        [DataMember()]
3936        [Display(AutoGenerateField=false)]
3937        public CourseParticipantClientState[] Participants
3938        {
3939            get
3940            {
3941                return this._participants;
3942            }
3943            set
3944            {
3945                if ((this._participants != value))
3946                {
3947                    this.OnParticipantsChanging(value);
3948                    this.RaiseDataMemberChanging("Participants");
3949                    this.ValidateProperty("Participants", value);
3950                    this._participants = value;
3951                    this.RaiseDataMemberChanged("Participants");
3952                    this.OnParticipantsChanged();
3953                }
3954            }
3955        }
3956        
3957        /// <summary>
3958        /// Gets or sets the 'Topics' value.
3959        /// </summary>
3960        [DataMember()]
3961        [Display(AutoGenerateField=false)]
3962        public CourseTopic[] Topics
3963        {
3964            get
3965            {
3966                return this._topics;
3967            }
3968            set
3969            {
3970                if ((this._topics != value))
3971                {
3972                    this.OnTopicsChanging(value);
3973                    this.RaiseDataMemberChanging("Topics");
3974                    this.ValidateProperty("Topics", value);
3975                    this._topics = value;
3976                    this.RaiseDataMemberChanged("Topics");
3977                    this.OnTopicsChanged();
3978                }
3979            }
3980        }
3981    }
3982    
3983    /// <summary>
3984    /// The 'CourseParticipantClientState' class.
3985    /// </summary>
3986    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
3987    public sealed partial class CourseParticipantClientState : ComplexObject
3988    {
3989        
3990        private AssignmentState[] _assignments;
3991        
3992        private int _id;
3993        
3994        private string _name;
3995        
3996        #region Extensibility Method Definitions
3997
3998        /// <summary>
3999        /// This method is invoked from the constructor once initialization is complete and
4000        /// can be used for further object setup.
4001        /// </summary>
4002        partial void OnCreated();
4003        partial void OnAssignmentsChanging(AssignmentState[] value);
4004        partial void OnAssignmentsChanged();
4005        partial void OnIdChanging(int value);
4006        partial void OnIdChanged();
4007        partial void OnNameChanging(string value);
4008        partial void OnNameChanged();
4009
4010        #endregion
4011        
4012        
4013        /// <summary>
4014        /// Initializes a new instance of the <see cref="CourseParticipantClientState"/> class.
4015        /// </summary>
4016        public CourseParticipantClientState()
4017        {
4018            this.OnCreated();
4019        }
4020        
4021        /// <summary>
4022        /// Gets or sets the 'Assignments' value.
4023        /// </summary>
4024        [DataMember()]
4025        [Display(AutoGenerateField=false)]
4026        public AssignmentState[] Assignments
4027        {
4028            get
4029            {
4030                return this._assignments;
4031            }
4032            set
4033            {
4034                if ((this._assignments != value))
4035                {
4036                    this.OnAssignmentsChanging(value);
4037                    this.RaiseDataMemberChanging("Assignments");
4038                    this.ValidateProperty("Assignments", value);
4039                    this._assignments = value;
4040                    this.RaiseDataMemberChanged("Assignments");
4041                    this.OnAssignmentsChanged();
4042                }
4043            }
4044        }
4045        
4046        /// <summary>
4047        /// Gets or sets the 'Id' value.
4048        /// </summary>
4049        [DataMember()]
4050        public int Id
4051        {
4052            get
4053            {
4054                return this._id;
4055            }
4056            set
4057            {
4058                if ((this._id != value))
4059                {
4060                    this.OnIdChanging(value);
4061                    this.RaiseDataMemberChanging("Id");
4062                    this.ValidateProperty("Id", value);
4063                    this._id = value;
4064                    this.RaiseDataMemberChanged("Id");
4065                    this.OnIdChanged();
4066                }
4067            }
4068        }
4069        
4070        /// <summary>
4071        /// Gets or sets the 'Name' value.
4072        /// </summary>
4073        [DataMember()]
4074        public string Name
4075        {
4076            get
4077            {
4078                return this._name;
4079            }
4080            set
4081            {
4082                if ((this._name != value))
4083                {
4084                    this.OnNameChanging(value);
4085                    this.RaiseDataMemberChanging("Name");
4086                    this.ValidateProperty("Name", value);
4087                    this._name = value;
4088                    this.RaiseDataMemberChanged("Name");
4089                    this.OnNameChanged();
4090                }
4091            }
4092        }
4093    }
4094    
4095    /// <summary>
4096    /// The 'ParticipantAssignment' class.
4097    /// </summary>
4098    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
4099    public sealed partial class ParticipantAssignment : ComplexObject
4100    {
4101        
4102        private bool _assigned;
4103        
4104        private int _participantId;
4105        
4106        private string _participantName;
4107        
4108        #region Extensibility Method Definitions
4109
4110        /// <summary>
4111        /// This method is invoked from the constructor once initialization is complete and
4112        /// can be used for further object setup.
4113        /// </summary>
4114        partial void OnCreated();
4115        partial void OnAssignedChanging(bool value);
4116        partial void OnAssignedChanged();
4117        partial void OnParticipantIdChanging(int value);
4118        partial void OnParticipantIdChanged();
4119        partial void OnParticipantNameChanging(string value);
4120        partial void OnParticipantNameChanged();
4121
4122        #endregion
4123        
4124        
4125        /// <summary>
4126        /// Initializes a new instance of the <see cref="ParticipantAssignment"/> class.
4127        /// </summary>
4128        public ParticipantAssignment()
4129        {
4130            this.OnCreated();
4131        }
4132        
4133        /// <summary>
4134        /// Gets or sets the 'Assigned' value.
4135        /// </summary>
4136        [DataMember()]
4137        public bool Assigned
4138        {
4139            get
4140            {
4141                return this._assigned;
4142            }
4143            set
4144            {
4145                if ((this._assigned != value))
4146                {
4147                    this.OnAssignedChanging(value);
4148                    this.RaiseDataMemberChanging("Assigned");
4149                    this.ValidateProperty("Assigned", value);
4150                    this._assigned = value;
4151                    this.RaiseDataMemberChanged("Assigned");
4152                    this.OnAssignedChanged();
4153                }
4154            }
4155        }
4156        
4157        /// <summary>
4158        /// Gets or sets the 'ParticipantId' value.
4159        /// </summary>
4160        [DataMember()]
4161        public int ParticipantId
4162        {
4163            get
4164            {
4165                return this._participantId;
4166            }
4167            set
4168            {
4169                if ((this._participantId != value))
4170                {
4171                    this.OnParticipantIdChanging(value);
4172                    this.RaiseDataMemberChanging("ParticipantId");
4173                    this.ValidateProperty("ParticipantId", value);
4174                    this._participantId = value;
4175                    this.RaiseDataMemberChanged("ParticipantId");
4176                    this.OnParticipantIdChanged();
4177                }
4178            }
4179        }
4180        
4181        /// <summary>
4182        /// Gets or sets the 'ParticipantName' value.
4183        /// </summary>
4184        [DataMember()]
4185        public string ParticipantName
4186        {
4187            get
4188            {
4189                return this._participantName;
4190            }
4191            set
4192            {
4193                if ((this._participantName != value))
4194                {
4195                    this.OnParticipantNameChanging(value);
4196                    this.RaiseDataMemberChanging("ParticipantName");
4197                    this.ValidateProperty("ParticipantName", value);
4198                    this._participantName = value;
4199                    this.RaiseDataMemberChanged("ParticipantName");
4200                    this.OnParticipantNameChanged();
4201                }
4202            }
4203        }
4204    }
4205    
4206    /// <summary>
4207    /// The 'ProblemDetails' class.
4208    /// </summary>
4209    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
4210    [XmlRoot(ElementName="task")]
4211    public sealed partial class ProblemDetails : ComplexObject
4212    {
4213        
4214        private string[] _compilers;
4215        
4216        private int _id;
4217        
4218        private string _name;
4219        
4220        private string _statementPath;
4221        
4222        private TestingInformation _testingInformation;
4223        
4224        #region Extensibility Method Definitions
4225
4226        /// <summary>
4227        /// This method is invoked from the constructor once initialization is complete and
4228        /// can be used for further object setup.
4229        /// </summary>
4230        partial void OnCreated();
4231        partial void OnCompilersChanging(string[] value);
4232        partial void OnCompilersChanged();
4233        partial void OnIdChanging(int value);
4234        partial void OnIdChanged();
4235        partial void OnNameChanging(string value);
4236        partial void OnNameChanged();
4237        partial void OnStatementPathChanging(string value);
4238        partial void OnStatementPathChanged();
4239        partial void OnTestingInformationChanging(TestingInformation value);
4240        partial void OnTestingInformationChanged();
4241
4242        #endregion
4243        
4244        
4245        /// <summary>
4246        /// Initializes a new instance of the <see cref="ProblemDetails"/> class.
4247        /// </summary>
4248        public ProblemDetails()
4249        {
4250            this.OnCreated();
4251        }
4252        
4253        /// <summary>
4254        /// Gets or sets the 'Compilers' value.
4255        /// </summary>
4256        [DataMember()]
4257        [XmlIgnore()]
4258        public string[] Compilers
4259        {
4260            get
4261            {
4262                return this._compilers;
4263            }
4264            set
4265            {
4266                if ((this._compilers != value))
4267                {
4268                    this.OnCompilersChanging(value);
4269                    this.RaiseDataMemberChanging("Compilers");
4270                    this.ValidateProperty("Compilers", value);
4271                    this._compilers = value;
4272                    this.RaiseDataMemberChanged("Compilers");
4273                    this.OnCompilersChanged();
4274                }
4275            }
4276        }
4277        
4278        /// <summary>
4279        /// Gets or sets the 'Id' value.
4280        /// </summary>
4281        [DataMember()]
4282        [XmlIgnore()]
4283        public int Id
4284        {
4285            get
4286            {
4287                return this._id;
4288            }
4289            set
4290            {
4291                if ((this._id != value))
4292                {
4293                    this.OnIdChanging(value);
4294                    this.RaiseDataMemberChanging("Id");
4295                    this.ValidateProperty("Id", value);
4296                    this._id = value;
4297                    this.RaiseDataMemberChanged("Id");
4298                    this.OnIdChanged();
4299                }
4300            }
4301        }
4302        
4303        /// <summary>
4304        /// Gets or sets the 'Name' value.
4305        /// </summary>
4306        [DataMember()]
4307        [XmlElement(ElementName="name")]
4308        public string Name
4309        {
4310            get
4311            {
4312                return this._name;
4313            }
4314            set
4315            {
4316                if ((this._name != value))
4317                {
4318                    this.OnNameChanging(value);
4319                    this.RaiseDataMemberChanging("Name");
4320                    this.ValidateProperty("Name", value);
4321                    this._name = value;
4322                    this.RaiseDataMemberChanged("Name");
4323                    this.OnNameChanged();
4324                }
4325            }
4326        }
4327        
4328        /// <summary>
4329        /// Gets or sets the 'StatementPath' value.
4330        /// </summary>
4331        [DataMember()]
4332        [XmlIgnore()]
4333        public string StatementPath
4334        {
4335            get
4336            {
4337                return this._statementPath;
4338            }
4339            set
4340            {
4341                if ((this._statementPath != value))
4342                {
4343                    this.OnStatementPathChanging(value);
4344                    this.RaiseDataMemberChanging("StatementPath");
4345                    this.ValidateProperty("StatementPath", value);
4346                    this._statementPath = value;
4347                    this.RaiseDataMemberChanged("StatementPath");
4348                    this.OnStatementPathChanged();
4349                }
4350            }
4351        }
4352        
4353        /// <summary>
4354        /// Gets or sets the 'TestingInformation' value.
4355        /// </summary>
4356        [DataMember()]
4357        [Display(AutoGenerateField=false)]
4358        [XmlElement(ElementName="testingInfo")]
4359        public TestingInformation TestingInformation
4360        {
4361            get
4362            {
4363                return this._testingInformation;
4364            }
4365            set
4366            {
4367                if ((this._testingInformation != value))
4368                {
4369                    this.OnTestingInformationChanging(value);
4370                    this.RaiseDataMemberChanging("TestingInformation");
4371                    this.ValidateProperty("TestingInformation", value);
4372                    this._testingInformation = value;
4373                    this.RaiseDataMemberChanged("TestingInformation");
4374                    this.OnTestingInformationChanged();
4375                }
4376            }
4377        }
4378    }
4379    
4380    /// <summary>
4381    /// The 'TaskIOFile' class.
4382    /// </summary>
4383    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
4384    public sealed partial class TaskIOFile : ComplexObject
4385    {
4386        
4387        private string _name;
4388        
4389        private string _type;
4390        
4391        #region Extensibility Method Definitions
4392
4393        /// <summary>
4394        /// This method is invoked from the constructor once initialization is complete and
4395        /// can be used for further object setup.
4396        /// </summary>
4397        partial void OnCreated();
4398        partial void OnNameChanging(string value);
4399        partial void OnNameChanged();
4400        partial void OnTypeChanging(string value);
4401        partial void OnTypeChanged();
4402
4403        #endregion
4404        
4405        
4406        /// <summary>
4407        /// Initializes a new instance of the <see cref="TaskIOFile"/> class.
4408        /// </summary>
4409        public TaskIOFile()
4410        {
4411            this.OnCreated();
4412        }
4413        
4414        /// <summary>
4415        /// Gets or sets the 'Name' value.
4416        /// </summary>
4417        [DataMember()]
4418        [XmlText()]
4419        public string Name
4420        {
4421            get
4422            {
4423                return this._name;
4424            }
4425            set
4426            {
4427                if ((this._name != value))
4428                {
4429                    this.OnNameChanging(value);
4430                    this.RaiseDataMemberChanging("Name");
4431                    this.ValidateProperty("Name", value);
4432                    this._name = value;
4433                    this.RaiseDataMemberChanged("Name");
4434                    this.OnNameChanged();
4435                }
4436            }
4437        }
4438        
4439        /// <summary>
4440        /// Gets or sets the 'Type' value.
4441        /// </summary>
4442        [DataMember()]
4443        [XmlAttribute(AttributeName="type")]
4444        public string Type
4445        {
4446            get
4447            {
4448                return this._type;
4449            }
4450            set
4451            {
4452                if ((this._type != value))
4453                {
4454                    this.OnTypeChanging(value);
4455                    this.RaiseDataMemberChanging("Type");
4456                    this.ValidateProperty("Type", value);
4457                    this._type = value;
4458                    this.RaiseDataMemberChanged("Type");
4459                    this.OnTypeChanged();
4460                }
4461            }
4462        }
4463    }
4464    
4465    /// <summary>
4466    /// The 'TestDescriptor' class.
4467    /// </summary>
4468    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
4469    public sealed partial class TestDescriptor : ComplexObject
4470    {
4471        
4472        private int _id;
4473        
4474        private int _memoryLimitMb;
4475        
4476        private float _timeLimitSec;
4477        
4478        #region Extensibility Method Definitions
4479
4480        /// <summary>
4481        /// This method is invoked from the constructor once initialization is complete and
4482        /// can be used for further object setup.
4483        /// </summary>
4484        partial void OnCreated();
4485        partial void OnIdChanging(int value);
4486        partial void OnIdChanged();
4487        partial void OnMemoryLimitMbChanging(int value);
4488        partial void OnMemoryLimitMbChanged();
4489        partial void OnTimeLimitSecChanging(float value);
4490        partial void OnTimeLimitSecChanged();
4491
4492        #endregion
4493        
4494        
4495        /// <summary>
4496        /// Initializes a new instance of the <see cref="TestDescriptor"/> class.
4497        /// </summary>
4498        public TestDescriptor()
4499        {
4500            this.OnCreated();
4501        }
4502        
4503        /// <summary>
4504        /// Gets or sets the 'Id' value.
4505        /// </summary>
4506        [DataMember()]
4507        [XmlAttribute(AttributeName="id")]
4508        public int Id
4509        {
4510            get
4511            {
4512                return this._id;
4513            }
4514            set
4515            {
4516                if ((this._id != value))
4517                {
4518                    this.OnIdChanging(value);
4519                    this.RaiseDataMemberChanging("Id");
4520                    this.ValidateProperty("Id", value);
4521                    this._id = value;
4522                    this.RaiseDataMemberChanged("Id");
4523                    this.OnIdChanged();
4524                }
4525            }
4526        }
4527        
4528        /// <summary>
4529        /// Gets or sets the 'MemoryLimitMb' value.
4530        /// </summary>
4531        [DataMember()]
4532        [XmlAttribute(AttributeName="memoryLimit")]
4533        public int MemoryLimitMb
4534        {
4535            get
4536            {
4537                return this._memoryLimitMb;
4538            }
4539            set
4540            {
4541                if ((this._memoryLimitMb != value))
4542                {
4543                    this.OnMemoryLimitMbChanging(value);
4544                    this.RaiseDataMemberChanging("MemoryLimitMb");
4545                    this.ValidateProperty("MemoryLimitMb", value);
4546                    this._memoryLimitMb = value;
4547                    this.RaiseDataMemberChanged("MemoryLimitMb");
4548                    this.OnMemoryLimitMbChanged();
4549                }
4550            }
4551        }
4552        
4553        /// <summary>
4554        /// Gets or sets the 'TimeLimitSec' value.
4555        /// </summary>
4556        [DataMember()]
4557        [XmlAttribute(AttributeName="timeLimit")]
4558        public float TimeLimitSec
4559        {
4560            get
4561            {
4562                return this._timeLimitSec;
4563            }
4564            set
4565            {
4566                if ((this._timeLimitSec != value))
4567                {
4568                    this.OnTimeLimitSecChanging(value);
4569                    this.RaiseDataMemberChanging("TimeLimitSec");
4570                    this.ValidateProperty("TimeLimitSec", value);
4571                    this._timeLimitSec = value;
4572                    this.RaiseDataMemberChanged("TimeLimitSec");
4573                    this.OnTimeLimitSecChanged();
4574                }
4575            }
4576        }
4577    }
4578    
4579    /// <summary>
4580    /// The 'TestingInformation' class.
4581    /// </summary>
4582    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
4583    public sealed partial class TestingInformation : ComplexObject
4584    {
4585        
4586        private TaskIOFile[] _ioFiles;
4587        
4588        private TestDescriptor[] _tests;
4589        
4590        #region Extensibility Method Definitions
4591
4592        /// <summary>
4593        /// This method is invoked from the constructor once initialization is complete and
4594        /// can be used for further object setup.
4595        /// </summary>
4596        partial void OnCreated();
4597        partial void OnIOFilesChanging(TaskIOFile[] value);
4598        partial void OnIOFilesChanged();
4599        partial void OnTestsChanging(TestDescriptor[] value);
4600        partial void OnTestsChanged();
4601
4602        #endregion
4603        
4604        
4605        /// <summary>
4606        /// Initializes a new instance of the <see cref="TestingInformation"/> class.
4607        /// </summary>
4608        public TestingInformation()
4609        {
4610            this.OnCreated();
4611        }
4612        
4613        /// <summary>
4614        /// Gets or sets the 'IOFiles' value.
4615        /// </summary>
4616        [DataMember()]
4617        [Display(AutoGenerateField=false)]
4618        [XmlArray(ElementName="files")]
4619        [XmlArrayItem(ElementName="file")]
4620        public TaskIOFile[] IOFiles
4621        {
4622            get
4623            {
4624                return this._ioFiles;
4625            }
4626            set
4627            {
4628                if ((this._ioFiles != value))
4629                {
4630                    this.OnIOFilesChanging(value);
4631                    this.RaiseDataMemberChanging("IOFiles");
4632                    this.ValidateProperty("IOFiles", value);
4633                    this._ioFiles = value;
4634                    this.RaiseDataMemberChanged("IOFiles");
4635                    this.OnIOFilesChanged();
4636                }
4637            }
4638        }
4639        
4640        /// <summary>
4641        /// Gets or sets the 'Tests' value.
4642        /// </summary>
4643        [DataMember()]
4644        [Display(AutoGenerateField=false)]
4645        [XmlArray(ElementName="tests")]
4646        [XmlArrayItem(ElementName="test")]
4647        public TestDescriptor[] Tests
4648        {
4649            get
4650            {
4651                return this._tests;
4652            }
4653            set
4654            {
4655                if ((this._tests != value))
4656                {
4657                    this.OnTestsChanging(value);
4658                    this.RaiseDataMemberChanging("Tests");
4659                    this.ValidateProperty("Tests", value);
4660                    this._tests = value;
4661                    this.RaiseDataMemberChanged("Tests");
4662                    this.OnTestsChanged();
4663                }
4664            }
4665        }
4666    }
4667    
4668    /// <summary>
4669    /// The 'TestingMachineEntity' entity class.
4670    /// </summary>
4671    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/glados.Web.Services.Entities")]
4672    public sealed partial class TestingMachineEntity : Entity
4673    {
4674        
4675        private string _name;
4676        
4677        private ServerStatus _status;
4678        
4679        #region Extensibility Method Definitions
4680
4681        /// <summary>
4682        /// This method is invoked from the constructor once initialization is complete and
4683        /// can be used for further object setup.
4684        /// </summary>
4685        partial void OnCreated();
4686        partial void OnNameChanging(string value);
4687        partial void OnNameChanged();
4688        partial void OnStatusChanging(ServerStatus value);
4689        partial void OnStatusChanged();
4690
4691        #endregion
4692        
4693        
4694        /// <summary>
4695        /// Initializes a new instance of the <see cref="TestingMachineEntity"/> class.
4696        /// </summary>
4697        public TestingMachineEntity()
4698        {
4699            this.OnCreated();
4700        }
4701        
4702        /// <summary>
4703        /// Gets or sets the 'Name' value.
4704        /// </summary>
4705        [DataMember()]
4706        [Editable(false, AllowInitialValue=true)]
4707        [Key()]
4708        [RoundtripOriginal()]
4709        public string Name
4710        {
4711            get
4712            {
4713                return this._name;
4714            }
4715            set
4716            {
4717                if ((this._name != value))
4718                {
4719                    this.OnNameChanging(value);
4720                    this.ValidateProperty("Name", value);
4721                    this._name = value;
4722                    this.RaisePropertyChanged("Name");
4723                    this.OnNameChanged();
4724                }
4725            }
4726        }
4727        
4728        /// <summary>
4729        /// Gets or sets the 'Status' value.
4730        /// </summary>
4731        [DataMember()]
4732        public ServerStatus Status
4733        {
4734            get
4735            {
4736                return this._status;
4737            }
4738            set
4739            {
4740                if ((this._status != value))
4741                {
4742                    this.OnStatusChanging(value);
4743                    this.RaiseDataMemberChanging("Status");
4744                    this.ValidateProperty("Status", value);
4745                    this._status = value;
4746                    this.RaiseDataMemberChanged("Status");
4747                    this.OnStatusChanged();
4748                }
4749            }
4750        }
4751        
4752        /// <summary>
4753        /// Computes a value from the key fields that uniquely identifies this entity instance.
4754        /// </summary>
4755        /// <returns>An object instance that uniquely identifies this entity instance.</returns>
4756        public override object GetIdentity()
4757        {
4758            return this._name;
4759        }
4760    }
4761}
4762namespace glados.Web.Services.RIAServices
4763{
4764    using System;
4765    using System.Collections.Generic;
4766    using System.ComponentModel;
4767    using System.ComponentModel.DataAnnotations;
4768    using System.Linq;
4769    using System.ServiceModel;
4770    using System.ServiceModel.DomainServices;
4771    using System.ServiceModel.DomainServices.Client;
4772    using System.ServiceModel.DomainServices.Client.ApplicationServices;
4773    using glados.Web.Logic.Base;
4774    using glados.Web.Services.Entities;
4775    
4776    
4777    /// <summary>
4778    /// The DomainContext corresponding to the 'CompetitionAdminService' DomainService.
4779    /// </summary>
4780    public sealed partial class CompetitionAdminContext : DomainContext
4781    {
4782        
4783        #region Extensibility Method Definitions
4784
4785        /// <summary>
4786        /// This method is invoked from the constructor once initialization is complete and
4787        /// can be used for further object setup.
4788        /// </summary>
4789        partial void OnCreated();
4790
4791        #endregion
4792        
4793        
4794        /// <summary>
4795        /// Initializes a new instance of the <see cref="CompetitionAdminContext"/> class.
4796        /// </summary>
4797        public CompetitionAdminContext() : 
4798                this(new WebDomainClient<ICompetitionAdminServiceContract>(new Uri("glados-Web-Services-RIAServices-CompetitionAdminService.svc", UriKind.Relative)))
4799        {
4800        }
4801        
4802        /// <summary>
4803        /// Initializes a new instance of the <see cref="CompetitionAdminContext"/> class with the specified service URI.
4804        /// </summary>
4805        /// <param name="serviceUri">The CompetitionAdminService service URI.</param>
4806        public CompetitionAdminContext(Uri serviceUri) : 
4807                this(new WebDomainClient<ICompetitionAdminServiceContract>(serviceUri))
4808        {
4809        }
4810        
4811        /// <summary>
4812        /// Initializes a new instance of the <see cref="CompetitionAdminContext"/> class with the specified <paramref name="domainClient"/>.
4813        /// </summary>
4814        /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
4815        public CompetitionAdminContext(DomainClient domainClient) : 
4816                base(domainClient)
4817        {
4818            this.OnCreated();
4819        }
4820        
4821        /// <summary>
4822        /// Asynchronously invokes the 'AssignTask' method of the DomainService.
4823        /// </summary>
4824        /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
4825        /// <param name="problemId">The value for the 'problemId' parameter of this action.</param>
4826        /// <param name="callback">Callback to invoke when the operation completes.</param>
4827        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
4828        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4829        public InvokeOperation AssignTask(int assignmentId, int problemId, Action<InvokeOperation> callback, object userState)
4830        {
4831            Dictionary<string, object> parameters = new Dictionary<string, object>();
4832            parameters.Add("assignmentId", assignmentId);
4833            parameters.Add("problemId", problemId);
4834            this.ValidateMethod("AssignTask", parameters);
4835            return this.InvokeOperation("AssignTask", typeof(void), parameters, true, callback, userState);
4836        }
4837        
4838        /// <summary>
4839        /// Asynchronously invokes the 'AssignTask' method of the DomainService.
4840        /// </summary>
4841        /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
4842        /// <param name="problemId">The value for the 'problemId' parameter of this action.</param>
4843        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4844        public InvokeOperation AssignTask(int assignmentId, int problemId)
4845        {
4846            Dictionary<string, object> parameters = new Dictionary<string, object>();
4847            parameters.Add("assignmentId", assignmentId);
4848            parameters.Add("problemId", problemId);
4849            this.ValidateMethod("AssignTask", parameters);
4850            return this.InvokeOperation("AssignTask", typeof(void), parameters, true, null, null);
4851        }
4852        
4853        /// <summary>
4854        /// Asynchronously invokes the 'CreateCompetition' method of the DomainService.
4855        /// </summary>
4856        /// <param name="name">The value for the 'name' parameter of this action.</param>
4857        /// <param name="typeName">The value for the 'typeName' parameter of this action.</param>
4858        /// <param name="callback">Callback to invoke when the operation completes.</param>
4859        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
4860        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4861        public InvokeOperation<int> CreateCompetition(string name, string typeName, Action<InvokeOperation<int>> callback, object userState)
4862        {
4863            Dictionary<string, object> parameters = new Dictionary<string, object>();
4864            parameters.Add("name", name);
4865            parameters.Add("typeName", typeName);
4866            this.ValidateMethod("CreateCompetition", parameters);
4867            return ((InvokeOperation<int>)(this.InvokeOperation("CreateCompetition", typeof(int), parameters, true, callback, userState)));
4868        }
4869        
4870        /// <summary>
4871        /// Asynchronously invokes the 'CreateCompetition' method of the DomainService.
4872        /// </summary>
4873        /// <param name="name">The value for the 'name' parameter of this action.</param>
4874        /// <param name="typeName">The value for the 'typeName' parameter of this action.</param>
4875        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4876        public InvokeOperation<int> CreateCompetition(string name, string typeName)
4877        {
4878            Dictionary<string, object> parameters = new Dictionary<string, object>();
4879            parameters.Add("name", name);
4880            parameters.Add("typeName", typeName);
4881            this.ValidateMethod("CreateCompetition", parameters);
4882            return ((InvokeOperation<int>)(this.InvokeOperation("CreateCompetition", typeof(int), parameters, true, null, null)));
4883        }
4884        
4885        /// <summary>
4886        /// Asynchronously invokes the 'DeleteCompetition' method of the DomainService.
4887        /// </summary>
4888        /// <param name="id">The value for the 'id' parameter of this action.</param>
4889        /// <param name="callback">Callback to invoke when the operation completes.</param>
4890        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
4891        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4892        public InvokeOperation DeleteCompetition(int id, Action<InvokeOperation> callback, object userState)
4893        {
4894            Dictionary<string, object> parameters = new Dictionary<string, object>();
4895            parameters.Add("id", id);
4896            this.ValidateMethod("DeleteCompetition", parameters);
4897            return this.InvokeOperation("DeleteCompetition", typeof(void), parameters, true, callback, userState);
4898        }
4899        
4900        /// <summary>
4901        /// Asynchronously invokes the 'DeleteCompetition' method of the DomainService.
4902        /// </summary>
4903        /// <param name="id">The value for the 'id' parameter of this action.</param>
4904        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4905        public InvokeOperation DeleteCompetition(int id)
4906        {
4907            Dictionary<string, object> parameters = new Dictionary<string, object>();
4908            parameters.Add("id", id);
4909            this.ValidateMethod("DeleteCompetition", parameters);
4910            return this.InvokeOperation("DeleteCompetition", typeof(void), parameters, true, null, null);
4911        }
4912        
4913        /// <summary>
4914        /// Asynchronously invokes the 'GetAssignmentsForCompetition' method of the DomainService.
4915        /// </summary>
4916        /// <param name="id">The value for the 'id' parameter of this action.</param>
4917        /// <param name="callback">Callback to invoke when the operation completes.</param>
4918        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
4919        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4920        public InvokeOperation<IEnumerable<ParticipantAssignment>> GetAssignmentsForCompetition(int id, Action<InvokeOperation<IEnumerable<ParticipantAssignment>>> callback, object userState)
4921        {
4922            Dictionary<string, object> parameters = new Dictionary<string, object>();
4923            parameters.Add("id", id);
4924            this.ValidateMethod("GetAssignmentsForCompetition", parameters);
4925            return ((InvokeOperation<IEnumerable<ParticipantAssignment>>)(this.InvokeOperation("GetAssignmentsForCompetition", typeof(IEnumerable<ParticipantAssignment>), parameters, true, callback, userState)));
4926        }
4927        
4928        /// <summary>
4929        /// Asynchronously invokes the 'GetAssignmentsForCompetition' method of the DomainService.
4930        /// </summary>
4931        /// <param name="id">The value for the 'id' parameter of this action.</param>
4932        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4933        public InvokeOperation<IEnumerable<ParticipantAssignment>> GetAssignmentsForCompetition(int id)
4934        {
4935            Dictionary<string, object> parameters = new Dictionary<string, object>();
4936            parameters.Add("id", id);
4937            this.ValidateMethod("GetAssignmentsForCompetition", parameters);
4938            return ((InvokeOperation<IEnumerable<ParticipantAssignment>>)(this.InvokeOperation("GetAssignmentsForCompetition", typeof(IEnumerable<ParticipantAssignment>), parameters, true, null, null)));
4939        }
4940        
4941        /// <summary>
4942        /// Asynchronously invokes the 'GetCompetitionMainPage' method of the DomainService.
4943        /// </summary>
4944        /// <param name="id">The value for the 'id' parameter of this action.</param>
4945        /// <param name="callback">Callback to invoke when the operation completes.</param>
4946        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
4947        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4948        public InvokeOperation<Uri> GetCompetitionMainPage(int id, Action<InvokeOperation<Uri>> callback, object userState)
4949        {
4950            Dictionary<string, object> parameters = new Dictionary<string, object>();
4951            parameters.Add("id", id);
4952            this.ValidateMethod("GetCompetitionMainPage", parameters);
4953            return ((InvokeOperation<Uri>)(this.InvokeOperation("GetCompetitionMainPage", typeof(Uri), parameters, true, callback, userState)));
4954        }
4955        
4956        /// <summary>
4957        /// Asynchronously invokes the 'GetCompetitionMainPage' method of the DomainService.
4958        /// </summary>
4959        /// <param name="id">The value for the 'id' parameter of this action.</param>
4960        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4961        public InvokeOperation<Uri> GetCompetitionMainPage(int id)
4962        {
4963            Dictionary<string, object> parameters = new Dictionary<string, object>();
4964            parameters.Add("id", id);
4965            this.ValidateMethod("GetCompetitionMainPage", parameters);
4966            return ((InvokeOperation<Uri>)(this.InvokeOperation("GetCompetitionMainPage", typeof(Uri), parameters, true, null, null)));
4967        }
4968        
4969        /// <summary>
4970        /// Asynchronously invokes the 'GetCompetitionTypeList' method of the DomainService.
4971        /// </summary>
4972        /// <param name="callback">Callback to invoke when the operation completes.</param>
4973        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
4974        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4975        public InvokeOperation<IEnumerable<string>> GetCompetitionTypeList(Action<InvokeOperation<IEnumerable<string>>> callback, object userState)
4976        {
4977            this.ValidateMethod("GetCompetitionTypeList", null);
4978            return ((InvokeOperation<IEnumerable<string>>)(this.InvokeOperation("GetCompetitionTypeList", typeof(IEnumerable<string>), null, true, callback, userState)));
4979        }
4980        
4981        /// <summary>
4982        /// Asynchronously invokes the 'GetCompetitionTypeList' method of the DomainService.
4983        /// </summary>
4984        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4985        public InvokeOperation<IEnumerable<string>> GetCompetitionTypeList()
4986        {
4987            this.ValidateMethod("GetCompetitionTypeList", null);
4988            return ((InvokeOperation<IEnumerable<string>>)(this.InvokeOperation("GetCompetitionTypeList", typeof(IEnumerable<string>), null, true, null, null)));
4989        }
4990        
4991        /// <summary>
4992        /// Asynchronously invokes the 'GetCourseParticipantStates' method of the DomainService.
4993        /// </summary>
4994        /// <param name="competitionId">The value for the 'competitionId' parameter of this action.</param>
4995        /// <param name="callback">Callback to invoke when the operation completes.</param>
4996        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
4997        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
4998        public InvokeOperation<CourseDashboardInfo> GetCourseParticipantStates(int competitionId, Action<InvokeOperation<CourseDashboardInfo>> callback, object userState)
4999        {
5000            Dictionary<string, object> parameters = new Dictionary<string, object>();
5001            parameters.Add("competitionId", competitionId);
5002            this.ValidateMethod("GetCourseParticipantStates", parameters);
5003            return ((InvokeOperation<CourseDashboardInfo>)(this.InvokeOperation("GetCourseParticipantStates", typeof(CourseDashboardInfo), parameters, true, callback, userState)));
5004        }
5005        
5006        /// <summary>
5007        /// Asynchronously invokes the 'GetCourseParticipantStates' method of the DomainService.
5008        /// </summary>
5009        /// <param name="competitionId">The value for the 'competitionId' parameter of this action.</param>
5010        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
5011        public InvokeOperation<CourseDashboardInfo> GetCourseParticipantStates(int competitionId)
5012        {
5013            Dictionary<string, object> parameters = new Dictionary<string, object>();
5014            parameters.Add("competitionId", competitionId);
5015            this.ValidateMethod("GetCourseParticipantStates", parameters);
5016            return ((InvokeOperation<CourseDashboardInfo>)(this.InvokeOperation("GetCourseParticipantStates", typeof(CourseDashboardInfo), parameters, true, null, null)));
5017        }
5018        
5019        /// <summary>
5020        /// Asynchronously invokes the 'SetAssignmentsForCompetition' method of the DomainService.
5021        /// </summary>
5022        /// <param name="id">The value for the 'id' parameter of this action.</param>
5023        /// <param name="assignments">The value for the 'assignments' parameter of this action.</param>
5024        /// <param name="callback">Callback to invoke when the operation completes.</param>
5025        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
5026        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
5027        public InvokeOperation SetAssignmentsForCompetition(int id, IEnumerable<ParticipantAssignment> assignments, Action<InvokeOperation> callback, object userState)
5028        {
5029            Dictionary<string, object> parameters = new Dictionary<string, object>();
5030            parameters.Add("id", id);
5031            parameters.Add("assignments", assignments);
5032            this.ValidateMethod("SetAssignmentsForCompetition", parameters);
5033            return this.InvokeOperation("SetAssignmentsForCompetition", typeof(void), parameters, true, callback, userState);
5034        }
5035        
5036        /// <summary>
5037        /// Asynchronously invokes the 'SetAssignmentsForCompetition' method of the DomainService.
5038        /// </summary>
5039        /// <param name="id">The value for the 'id' parameter of this action.</param>
5040        /// <param name="assignments">The value for the 'assignments' parameter of this action.</param>
5041        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
5042        public InvokeOperation SetAssignmentsForCompetition(int id, IEnumerable<ParticipantAssignment> assignments)
5043        {
5044            Dictionary<string, object> parameters = new Dictionary<string, object>();
5045            parameters.Add("id", id);
5046            parameters.Add("assignments", assignments);
5047            this.ValidateMethod("SetAssignmentsForCompetition", parameters);
5048            return this.InvokeOperation("SetAssignmentsForCompetition", typeof(void), parameters, true, null, null);
5049        }
5050        
5051        /// <summary>
5052        /// Creates a new EntityContainer for this DomainContext's EntitySets.
5053        /// </summary>
5054        /// <returns>A new container instance.</returns>
5055        protected override EntityContainer CreateEntityContainer()
5056        {
5057            return new CompetitionAdminContextEntityContainer();
5058        }
5059        
5060        /// <summary>
5061        /// Service contract for the 'CompetitionAdminService' DomainService.
5062        /// </summary>
5063        [ServiceContract()]
5064        public interface ICompetitionAdminServiceContract
5065        {
5066            
5067            /// <summary>
5068            /// Asynchronously invokes the 'AssignTask' operation.
5069            /// </summary>
5070            /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
5071            /// <param name="problemId">The value for the 'problemId' parameter of this action.</param>
5072            /// <param name="callback">Callback to invoke on completion.</param>
5073            /// <param name="asyncState">Optional state object.</param>
5074            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
5075            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/AssignTaskDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
5076            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/AssignTask", ReplyAction="http://tempuri.org/CompetitionAdminService/AssignTaskResponse")]
5077            IAsyncResult BeginAssignTask(int assignmentId, int problemId, AsyncCallback callback, object asyncState);
5078            
5079            /// <summary>
5080            /// Completes the asynchronous operation begun by 'BeginAssignTask'.
5081            /// </summary>
5082            /// <param name="result">The IAsyncResult returned from 'BeginAssignTask'.</param>
5083            void EndAssignTask(IAsyncResult result);
5084            
5085            /// <summary>
5086            /// Asynchronously invokes the 'CreateCompetition' operation.
5087            /// </summary>
5088            /// <param name="name">The value for the 'name' parameter of this action.</param>
5089            /// <param name="typeName">The value for the 'typeName' parameter of this action.</param>
5090            /// <param name="callback">Callback to invoke on completion.</param>
5091            /// <param name="asyncState">Optional state object.</param>
5092            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
5093            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/CreateCompetitionDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
5094            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/CreateCompetition", ReplyAction="http://tempuri.org/CompetitionAdminService/CreateCompetitionResponse")]
5095            IAsyncResult BeginCreateCompetition(string name, string typeName, AsyncCallback callback, object asyncState);
5096            
5097            /// <summary>
5098            /// Completes the asynchronous operation begun by 'BeginCreateCompetition'.
5099            /// </summary>
5100            /// <param name="result">The IAsyncResult returned from 'BeginCreateCompetition'.</param>
5101            /// <returns>The 'Int32' returned from the 'CreateCompetition' operation.</returns>
5102            int EndCreateCompetition(IAsyncResult result);
5103            
5104            /// <summary>
5105            /// Asynchronously invokes the 'DeleteCompetition' operation.
5106            /// </summary>
5107            /// <param name="id">The value for the 'id' parameter of this action.</param>
5108            /// <param name="callback">Callback to invoke on completion.</param>
5109            /// <param name="asyncState">Optional state object.</param>
5110            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
5111            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/DeleteCompetitionDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
5112            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/DeleteCompetition", ReplyAction="http://tempuri.org/CompetitionAdminService/DeleteCompetitionResponse")]
5113            IAsyncResult BeginDeleteCompetition(int id, AsyncCallback callback, object asyncState);
5114            
5115            /// <summary>
5116            /// Completes the asynchronous operation begun by 'BeginDeleteCompetition'.
5117            /// </summary>
5118            /// <param name="result">The IAsyncResult returned from 'BeginDeleteCompetition'.</param>
5119            void EndDeleteCompetition(IAsyncResult result);
5120            
5121            /// <summary>
5122            /// Asynchronously invokes the 'GetAssignmentsForCompetition' operation.
5123            /// </summary>
5124            /// <param name="id">The value for the 'id' parameter of this action.</param>
5125            /// <param name="callback">Callback to invoke on completion.</param>
5126            /// <param name="asyncState">Optional state object.</param>
5127            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
5128            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/GetAssignmentsForCompetitionDomainServ" +
5129                "iceFault", Name="DomainServiceFault", Namespace="DomainServices")]
5130            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/GetAssignmentsForCompetition", ReplyAction="http://tempuri.org/CompetitionAdminService/GetAssignmentsForCompetitionResponse")]
5131            IAsyncResult BeginGetAssignmentsForCompetition(int id, AsyncCallback callback, object asyncState);
5132            
5133            /// <summary>
5134            /// Completes the asynchronous operation begun by 'BeginGetAssignmentsForCompetition'.
5135            /// </summary>
5136            /// <param name="result">The IAsyncResult returned from 'BeginGetAssignmentsForCompetition'.</param>
5137            /// <returns>The 'IEnumerable`1' returned from the 'GetAssignmentsForCompetition' operation.</returns>
5138            IEnumerable<ParticipantAssignment> EndGetAssignmentsForCompetition(IAsyncResult result);
5139            
5140            /// <summary>
5141            /// Asynchronously invokes the 'GetCompetitionMainPage' operation.
5142            /// </summary>
5143            /// <param name="id">The value for the 'id' parameter of this action.</param>
5144            /// <param name="callback">Callback to invoke on completion.</param>
5145            /// <param name="asyncState">Optional state object.</param>
5146            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
5147            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/GetCompetitionMainPageDomainServiceFau" +
5148                "lt", Name="DomainServiceFault", Namespace="DomainServices")]
5149            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/GetCompetitionMainPage", ReplyAction="http://tempuri.org/CompetitionAdminService/GetCompetitionMainPageResponse")]
5150            IAsyncResult BeginGetCompetitionMainPage(int id, AsyncCallback callback, object asyncState);
5151            
5152            /// <summary>
5153            /// Completes the asynchronous operation begun by 'BeginGetCompetitionMainPage'.
5154            /// </summary>
5155            /// <param name="result">The IAsyncResult returned from 'BeginGetCompetitionMainPage'.</param>
5156            /// <returns>The 'Uri' returned from the 'GetCompetitionMainPage' operation.</returns>
5157            Uri EndGetCompetitionMainPage(IAsyncResult result);
5158            
5159            /// <summary>
5160            /// Asynchronously invokes the 'GetCompetitionTypeList' operation.
5161            /// </summary>
5162            /// <param name="callback">Callback to invoke on completion.</param>
5163            /// <param name="asyncState">Optional state object.</param>
5164            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
5165            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/GetCompetitionTypeListDomainServiceFau" +
5166                "lt", Name="DomainServiceFault", Namespace="DomainServices")]
5167            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/GetCompetitionTypeList", ReplyAction="http://tempuri.org/CompetitionAdminService/GetCompetitionTypeListResponse")]
5168            IAsyncResult BeginGetCompetitionTypeList(AsyncCallback callback, object asyncState);
5169            
5170            /// <summary>
5171            /// Completes the asynchronous operation begun by 'BeginGetCompetitionTypeList'.
5172            /// </summary>
5173            /// <param name="result">The IAsyncResult returned from 'BeginGetCompetitionTypeList'.</param>
5174            /// <returns>The 'IEnumerable`1' returned from the 'GetCompetitionTypeList' operation.</returns>
5175            IEnumerable<string> EndGetCompetitionTypeList(IAsyncResult result);
5176            
5177            /// <summary>
5178            /// Asynchronously invokes the 'GetCourseParticipantStates' operation.
5179            /// </summary>
5180            /// <param name="competitionId">The value for the 'competitionId' parameter of this action.</param>
5181            /// <param name="callback">Callback to invoke on completion.</param>
5182            /// <param name="asyncState">Optional state object.</param>
5183            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
5184            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/GetCourseParticipantStatesDomainServic" +
5185                "eFault", Name="DomainServiceFault", Namespace="DomainServices")]
5186            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/GetCourseParticipantStates", ReplyAction="http://tempuri.org/CompetitionAdminService/GetCourseParticipantStatesResponse")]
5187            IAsyncResult BeginGetCourseParticipantStates(int competitionId, AsyncCallback callback, object asyncState);
5188            
5189            /// <summary>
5190            /// Completes the asynchronous operation begun by 'BeginGetCourseParticipantStates'.
5191            /// </summary>
5192            /// <param name="result">The IAsyncResult returned from 'BeginGetCourseParticipantStates'.</param>
5193            /// <returns>The 'CourseDashboardInfo' returned from the 'GetCourseParticipantStates' operation.</returns>
5194            CourseDashboardInfo EndGetCourseParticipantStates(IAsyncResult result);
5195            
5196            /// <summary>
5197            /// Asynchronously invokes the 'SetAssignmentsForCompetition' operation.
5198            /// </summary>
5199            /// <param name="id">The value for the 'id' parameter of this action.</param>
5200            /// <param name="assignments">The value for the 'assignments' parameter of this action.</param>
5201            /// <param name="callback">Callback to invoke on completion.</param>
5202            /// <param name="asyncState">Optional state object.</param>
5203            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
5204            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/CompetitionAdminService/SetAssignmentsForCompetitionDomainServ" +
5205                "iceFault", Name="DomainServiceFault", Namespace="DomainServices")]
5206            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/CompetitionAdminService/SetAssignmentsForCompetition", ReplyAction="http://tempuri.org/CompetitionAdminService/SetAssignmentsForCompetitionResponse")]
5207            IAsyncResult BeginSetAssignmentsForCompetition(int id, IEnumerable<ParticipantAssignment> assignments, AsyncCallback callback, object asyncState);
5208            
5209            /// <summary>
5210            /// Completes the asynchronous operation begun by 'BeginSetAssignmentsForCompetition'.
5211            /// </summary>
5212            /// <param name="result">The IAsyncResult returned from 'BeginSetAssignmentsForCompetition'.</param>
5213            void EndSetAssignmentsForCompetition(IAsyncResult result);
5214        }
5215        
5216        internal sealed class CompetitionAdminContextEntityContainer : EntityContainer
5217        {
5218            
5219            public CompetitionAdminContextEntityContainer()
5220            {
5221            }
5222        }
5223    }
5224    
5225    /// <summary>
5226    /// The DomainContext corresponding to the 'ParticipationService' DomainService.
5227    /// </summary>
5228    public sealed partial class ParticipationContext : DomainContext
5229    {
5230        
5231        #region Extensibility Method Definitions
5232
5233        /// <summary>
5234        /// This method is invoked from the constructor once initialization is complete and
5235        /// can be used for further object setup.
5236        /// </summary>
5237        partial void OnCreated();
5238
5239        #endregion
5240        
5241        
5242        /// <summary>
5243        /// Initializes a new instance of the <see cref="ParticipationContext"/> class.
5244        /// </summary>
5245        public ParticipationContext() : 
5246                this(new WebDomainClient<IParticipationServiceContract>(new Uri("glados-Web-Services-RIAServices-ParticipationService.svc", UriKind.Relative)))
5247        {
5248        }
5249        
5250        /// <summary>
5251        /// Initializes a new instance of the <see cref="ParticipationContext"/> class with the specified service URI.
5252        /// </summary>
5253        /// <param name="serviceUri">The ParticipationService service URI.</param>
5254        public ParticipationContext(Uri serviceUri) : 
5255                this(new WebDomainClient<IParticipationServiceContract>(serviceUri))
5256        {
5257        }
5258        
5259        /// <summary>
5260        /// Initializes a new instance of the <see cref="ParticipationContext"/> class with the specified <paramref name="domainClient"/>.
5261        /// </summary>
5262        /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
5263        public ParticipationContext(DomainClient domainClient) : 
5264                base(domainClient)
5265        {
5266            this.OnCreated();
5267        }
5268        
5269        /// <summary>
5270        /// Asynchronously invokes the 'GetParticipantsForCompetition' method of the DomainService.
5271        /// </summary>
5272        /// <param name="competitionId">The value for the 'competitionId' parameter of this action.</param>
5273        /// <param name="callback">Callback to invoke when the operation completes.</param>
5274        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
5275        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
5276        public InvokeOperation<IEnumerable<ParticipantState>> GetParticipantsForCompetition(int competitionId, Action<InvokeOperation<IEnumerable<ParticipantState>>> callback, object userState)
5277        {
5278            Dictionary<string, object> parameters = new Dictionary<string, object>();
5279            parameters.Add("competitionId", competitionId);
5280            this.ValidateMethod("GetParticipantsForCompetition", parameters);
5281            return ((InvokeOperation<IEnumerable<ParticipantState>>)(this.InvokeOperation("GetParticipantsForCompetition", typeof(IEnumerable<ParticipantState>), parameters, true, callback, userState)));
5282        }
5283        
5284        /// <summary>
5285        /// Asynchronously invokes the 'GetParticipantsForCompetition' method of the DomainService.
5286        /// </summary>
5287        /// <param name="competitionId">The value for the 'competitionId' parameter of this action.</param>
5288        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
5289        public InvokeOperation<IEnumerable<ParticipantState>> GetParticipantsForCompetition(int competitionId)
5290        {
5291            Dictionary<string, object> parameters = new Dictionary<string, object>();
5292            parameters.Add("competitionId", competitionId);
5293            this.ValidateMethod("GetParticipantsForCompetition", parameters);
5294            return ((InvokeOperation<IEnumerable<ParticipantState>>)(this.InvokeOperation("GetParticipantsForCompetition", typeof(IEnumerable<ParticipantState>), parameters, true, null, null)));
5295        }
5296        
5297        /// <summary>
5298        /// Asynchronously invokes the 'GetProblemByAssignmentId' method of the DomainService.
5299        /// </summary>
5300        /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
5301        /// <param name="callback">Callback to invoke when the operation completes.</param>
5302        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
5303        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
5304        public InvokeOperation<ProblemDetails> GetProblemByAssignmentId(int assignmentId, Action<InvokeOperation<ProblemDetails>> callback, object userState)
5305        {
5306            Dictionary<string, object> parameters = new Dictionary<string, object>();
5307            parameters.Add("assignmentId", assignmentId);
5308            this.ValidateMethod("GetProblemByAssignmentId", parameters);
5309            return ((InvokeOperation<ProblemDetails>)(this.InvokeOperation("GetProblemByAssignmentId", typeof(ProblemDetails), parameters, true, callback, userState)));
5310        }
5311        
5312        /// <summary>
5313        /// Asynchronously invokes the 'GetProblemByAssignmentId' method of the DomainService.
5314        /// </summary>
5315        /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
5316        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
5317        public InvokeOperation<ProblemDetails> GetProblemByAssignmentId(int assignmentId)
5318        {
5319            Dictionary<string, object> parameters = new Dictionary<string, object>();
5320            parameters.Add("assignmentId", assignmentId);
5321            this.ValidateMethod("GetProblemByAssignmentId", parameters);
5322            return ((InvokeOperation<ProblemDetails>)(this.InvokeOperation("GetProblemByAssignmentId", typeof(ProblemDetails), parameters, true, null, null)));
5323        }
5324        
5325        /// <summary>
5326        /// Asynchronously invokes the 'GetProblemDetails' method of the DomainService.
5327        /// </summary>
5328        /// <param name="problemId">The value for the 'problemId' parameter of this action.</param>
5329        /// <param name="callback">Callback to invoke when the operation completes.</param>
5330        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
5331        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
5332        public InvokeOperation<ProblemDetails> GetProblemDetails(int problemId, Action<InvokeOperation<ProblemDetails>> callback, object userState)
5333        {
5334            Dictionary<string, object> parameters = new Dictionary<string, object>();
5335            parameters.Add("problemId", problemId);
5336            this.ValidateMethod("GetProblemDetails", parameters);
5337            return ((InvokeOperation<ProblemDetails>)(this.InvokeOperation("GetProblemDetails", typeof(ProblemDetails), parameters, true, callback, userState)));
5338        }
5339        
5340        /// <summary>
5341        /// Asynchronously invokes the 'GetProblemDetails' method of the DomainService.
5342        /// </summary>
5343        /// <param name="problemId">The value for the 'problemId' parameter of this action.</param>
5344        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
5345        public InvokeOperation<ProblemDetails> GetProblemDetails(int problemId)
5346        {
5347            Dictionary<string, object> parameters = new Dictionary<string, object>();
5348            parameters.Add("problemId", problemId);
5349            this.ValidateMethod("GetProblemDetails", parameters);
5350            return ((InvokeOperation<ProblemDetails>)(this.InvokeOperation("GetProblemDetails", typeof(ProblemDetails), parameters, true, null, null)));
5351        }
5352        
5353        /// <summary>
5354        /// Asynchronously invokes the 'SubmitSolution' method of the DomainService.
5355        /// </summary>
5356        /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
5357        /// <param name="compilerName">The value for the 'compilerName' parameter of this action.</param>
5358        /// <param name="source">The value for the 'source' parameter of this action.</param>
5359        /// <param name="callback">Callback to invoke when the operation completes.</param>
5360        /// <param name="userState">Value to pass to the callback.  It can be <c>null</c>.</param>
5361        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
5362        public InvokeOperation<int> SubmitSolution(int assignmentId, string compilerName, byte[] source, Action<InvokeOperation<int>> callback, object userState)
5363        {
5364            Dictionary<string, object> parameters = new Dictionary<string, object>();
5365            parameters.Add("assignmentId", assignmentId);
5366            parameters.Add("compilerName", compilerName);
5367            parameters.Add("source", source);
5368            this.ValidateMethod("SubmitSolution", parameters);
5369            return ((InvokeOperation<int>)(this.InvokeOperation("SubmitSolution", typeof(int), parameters, true, callback, userState)));
5370        }
5371        
5372        /// <summary>
5373        /// Asynchronously invokes the 'SubmitSolution' method of the DomainService.
5374        /// </summary>
5375        /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
5376        /// <param name="compilerName">The value for the 'compilerName' parameter of this action.</param>
5377        /// <param name="source">The value for the 'source' parameter of this action.</param>
5378        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
5379        public InvokeOperation<int> SubmitSolution(int assignmentId, string compilerName, byte[] source)
5380        {
5381            Dictionary<string, object> parameters = new Dictionary<string, object>();
5382            parameters.Add("assignmentId", assignmentId);
5383            parameters.Add("compilerName", compilerName);
5384            parameters.Add("source", source);
5385            this.ValidateMethod("SubmitSolution", parameters);
5386            return ((InvokeOperation<int>)(this.InvokeOperation("SubmitSolution", typeof(int), parameters, true, null, null)));
5387        }
5388        
5389        /// <summary>
5390        /// Creates a new EntityContainer for this DomainContext's EntitySets.
5391        /// </summary>
5392        /// <returns>A new container instance.</returns>
5393        protected override EntityContainer CreateEntityContainer()
5394        {
5395            return new ParticipationContextEntityContainer();
5396        }
5397        
5398        /// <summary>
5399        /// Service contract for the 'ParticipationService' DomainService.
5400        /// </summary>
5401        [ServiceContract()]
5402        public interface IParticipationServiceContract
5403        {
5404            
5405            /// <summary>
5406            /// Asynchronously invokes the 'GetParticipantsForCompetition' operation.
5407            /// </summary>
5408            /// <param name="competitionId">The value for the 'competitionId' parameter of this action.</param>
5409            /// <param name="callback">Callback to invoke on completion.</param>
5410            /// <param name="asyncState">Optional state object.</param>
5411            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
5412            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ParticipationService/GetParticipantsForCompetitionDomainServic" +
5413                "eFault", Name="DomainServiceFault", Namespace="DomainServices")]
5414            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ParticipationService/GetParticipantsForCompetition", ReplyAction="http://tempuri.org/ParticipationService/GetParticipantsForCompetitionResponse")]
5415            IAsyncResult BeginGetParticipantsForCompetition(int competitionId, AsyncCallback callback, object asyncState);
5416            
5417            /// <summary>
5418            /// Completes the asynchronous operation begun by 'BeginGetParticipantsForCompetition'.
5419            /// </summary>
5420            /// <param name="result">The IAsyncResult returned from 'BeginGetParticipantsForCompetition'.</param>
5421            /// <returns>The 'IEnumerable`1' returned from the 'GetParticipantsForCompetition' operation.</returns>
5422            IEnumerable<ParticipantState> EndGetParticipantsForCompetition(IAsyncResult result);
5423            
5424            /// <summary>
5425            /// Asynchronously invokes the 'GetProblemByAssignmentId' operation.
5426            /// </summary>
5427            /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
5428            /// <param name="callback">Callback to invoke on completion.</param>
5429            /// <param name="asyncState">Optional state object.</param>
5430            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
5431            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ParticipationService/GetProblemByAssignmentIdDomainServiceFaul" +
5432                "t", Name="DomainServiceFault", Namespace="DomainServices")]
5433            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ParticipationService/GetProblemByAssignmentId", ReplyAction="http://tempuri.org/ParticipationService/GetProblemByAssignmentIdResponse")]
5434            IAsyncResult BeginGetProblemByAssignmentId(int assignmentId, AsyncCallback callback, object asyncState);
5435            
5436            /// <summary>
5437            /// Completes the asynchronous operation begun by 'BeginGetProblemByAssignmentId'.
5438            /// </summary>
5439            /// <param name="result">The IAsyncResult returned from 'BeginGetProblemByAssignmentId'.</param>
5440            /// <returns>The 'ProblemDetails' returned from the 'GetProblemByAssignmentId' operation.</returns>
5441            ProblemDetails EndGetProblemByAssignmentId(IAsyncResult result);
5442            
5443            /// <summary>
5444            /// Asynchronously invokes the 'GetProblemDetails' operation.
5445            /// </summary>
5446            /// <param name="problemId">The value for the 'problemId' parameter of this action.</param>
5447            /// <param name="callback">Callback to invoke on completion.</param>
5448            /// <param name="asyncState">Optional state object.</param>
5449            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
5450            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ParticipationService/GetProblemDetailsDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
5451            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ParticipationService/GetProblemDetails", ReplyAction="http://tempuri.org/ParticipationService/GetProblemDetailsResponse")]
5452            IAsyncResult BeginGetProblemDetails(int problemId, AsyncCallback callback, object asyncState);
5453            
5454            /// <summary>
5455            /// Completes the asynchronous operation begun by 'BeginGetProblemDetails'.
5456            /// </summary>
5457            /// <param name="result">The IAsyncResult returned from 'BeginGetProblemDetails'.</param>
5458            /// <returns>The 'ProblemDetails' returned from the 'GetProblemDetails' operation.</returns>
5459            ProblemDetails EndGetProblemDetails(IAsyncResult result);
5460            
5461            /// <summary>
5462            /// Asynchronously invokes the 'SubmitSolution' operation.
5463            /// </summary>
5464            /// <param name="assignmentId">The value for the 'assignmentId' parameter of this action.</param>
5465            /// <param name="compilerName">The value for the 'compilerName' parameter of this action.</param>
5466            /// <param name="source">The value for the 'source' parameter of this action.</param>
5467            /// <param name="callback">Callback to invoke on completion.</param>
5468            /// <param name="asyncState">Optional state object.</param>
5469            /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
5470            [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ParticipationService/SubmitSolutionDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
5471            [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ParticipationService/SubmitSolution", ReplyAction="http://tempuri.org/ParticipationService/SubmitSolutionResponse")]
5472            IAsyncResult BeginSubmitSolution(int assignmentId, string compilerName, byte[] source, AsyncCallback callback, object asyncState);
5473            
5474            /// <summary>
5475            /// Completes the asynchronous operation begun by 'BeginSubmitSolution'.
5476            /// </summary>
5477            /// <param name="result">The IAsyncResult returned from 'BeginSubmitSolution'.</param>
5478            /// <returns>The 'Int32' returned from the 'SubmitSolution' operation.</returns>
5479            int EndSubmitSolution(IAsyncResult result);
5480        }
5481        
5482        internal sealed class ParticipationContextEntityContainer : EntityContainer
5483        {
5484            
5485            public ParticipationContextEntityContainer()
5486            {
5487            }
5488        }
5489    }
5490}