PageRenderTime 49ms CodeModel.GetById 5ms app.highlight 27ms RepoModel.GetById 1ms app.codeStats 0ms

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

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