예제 #1
0
 public Tag(String tagName)
 {
     try
     {
         ErrorChecking.CheckStringForNullEmptyOrWhiteSpace_ThrowException(tagName);
     }
     catch (ArgumentNullException ex)
     {
         throw new ArgumentNullException("In class Tag, constructor, argument tagName. " + ex.Message);
     }
     catch (ArgumentException ex)
     {
         throw new ArgumentException("In class Tag, constructor, argument tagName. " + ex.Message);
     }
     this.TagName           = tagName.Trim();
     this.TagName_LowerCase = tagName.Trim().ToLower();
 }
예제 #2
0
        public void setTitle(String title)
        {
            try
            {
                ErrorChecking.CheckStringForNullEmptyOrWhiteSpace_ThrowException(title);
            }
            catch (ArgumentNullException ex)
            {
                throw new ArgumentNullException("In abstract class MusicSelection, method setTitle(), argument title. " + ex.Message);
            }
            catch (ArgumentException ex)
            {
                throw new ArgumentException("In abstract class MusicSelection, method setTitle(), argument title. " + ex.Message);
            }

            this.Title           = title.Trim();
            this.Title_LowerCase = title.Trim().ToLower();
        }
예제 #3
0
        public MusicSelection(String id, String institution_Id, String title, Contributor composer)
        {
            try
            {
                ErrorChecking.CheckStringForNullEmptyOrWhiteSpace_ThrowException(id);
                ErrorChecking.CheckStringForNullEmptyOrWhiteSpace_ThrowException(institution_Id);
                ErrorChecking.CheckStringForNullEmptyOrWhiteSpace_ThrowException(title);
                ErrorChecking.CheckObjectForNull(composer);

                this._id                       = id;
                this.Institution_id            = institution_Id;
                this.Title                     = title.Trim();
                this.Title_LowerCase           = title.Trim().ToLower();
                this.Composer                  = composer;
                this.Publisher                 = "";
                this.Publisher_LowerCase       = "";
                this.ItemNumber                = "";
                this.ItemNumber_LowerCase      = "";
                this.Notes                     = "";
                this.PerformanceNotes          = "";
                this.PerformanceNotesArePublic = false;
                this.IsLendable                = false;
                this.DifficultyLevel           = "";
                this.DifficultyLevel_LowerCase = "";
                this.Genre                     = "";
                this.Genre_LowerCase           = "";
                this.Instrumentation           = "";
                this.Instrumentation_LowerCase = "";
                this.Tags                      = new List <Tag>();
                this.Contributors              = new List <Contributor>();
            }
            catch (ArgumentNullException ex)
            {
                throw new ArgumentNullException("In class Music selection, constructor with _id. " + ex.Message);
            }
            catch (ArgumentException ex)
            {
                throw new ArgumentException("In class Music selection, constructor with _id. " + ex.Message);
            }
        }