PageRenderTime 50ms CodeModel.GetById 4ms app.highlight 31ms RepoModel.GetById 1ms app.codeStats 0ms

/glados_proto/glados_proto/Generated_Code/glados.Web.g.cs-299c7693

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