public static SubmissionStatusModel GetInstance() { if(submission_model_ == null){ submission_model_ = new SubmissionStatusModel(); } return submission_model_; }
public static SubmissionStatusModel GetInstance() { if (submission_model_ == null) { submission_model_ = new SubmissionStatusModel(); } return(submission_model_); }
public SubmissionStatusNetworkService(SendingQueue sender, RoleModel role) { submission_status_model_ = SubmissionStatusModel.GetInstance(); if (role is StudentModel) { submission_status_model_.Role = "student"; submission_status_model_.Changed["SubmissionStatus"].Add(new PropertyEventHandler(this.StudentSendStatus)); } else if(role is InstructorModel){ submission_status_model_.Role = "instructor"; submission_status_model_.Changed["Id"].Add(new PropertyEventHandler(this.InstructorSendStatus)); } sender_ = sender; }
public SubmissionStatusMessage( Message parent, SerializedPacket p ) : base(parent, p) { this.sender_ = (!SerializedPacket.IsNullPacket( p.PeekNextPart() )) ? new SubmissionStatusModel( p.PeekNextPart() ) : null; p.GetNextPart(); }
/// <summary> /// constructor for creating a confirmation message from the instructor. /// Here Id is the id of the student this message is for. /// </summary> /// <param name="status"></param> /// <param name="id"></param> public SubmissionStatusMessage(SubmissionStatusModel submission_model) : base(Guid.NewGuid()) { ///the model that send this. sender_ = submission_model; }