예제 #1
0
        /// <summary>
        /// Factory method for creating a new SamplingPoint object, automatically setting a new Guid for the identifier.
        /// </summary>
        /// <param name="name">Point name</param>
        /// <returns>Instance of SamplingPoint</returns>
        public static SamplingPoint CreateNewSamplingPoint(string name)
        {
            SamplingPoint s = new SamplingPoint()
            {
                Name = name
            };

            s.SetNewId();

            return(s);
        }
예제 #2
0
 /// <summary>
 /// Adds a <see cref="SamplingPoint"/> to the Site, setting the point's LocationId.
 /// </summary>
 /// <param name="point"></param>
 public void AddSamplingPoint(SamplingPoint point)
 {
     point.SiteId = this.Id;
     this.SamplingPoints.Add(point);
 }