Пример #1
0
        /// <summary>
        /// Create and initializes a instance of the <c>Barrier</c> class.
        /// </summary>
        /// <param name="entity">Entity for initialization.</param>
        internal Barrier(DataModel.Barriers entity)
            : base(entity)
        {
            Debug.Assert(0 < entity.CreationTime); // NOTE: must be inited

            _barrierEffect = BarrierEffect.CreateFromDBString(entity.BarrierType);

            _barrierEffect.PropertyChanged +=
                new PropertyChangedEventHandler(_BarrierEffect_PropertyChanged);
        }
 /// <summary>
 /// Create a new Barriers object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="startDate">Initial value of the StartDate property.</param>
 /// <param name="finishDate">Initial value of the FinishDate property.</param>
 public static Barriers CreateBarriers(global::System.Guid id, global::System.DateTime startDate, global::System.DateTime finishDate)
 {
     Barriers barriers = new Barriers();
     barriers.Id = id;
     barriers.StartDate = startDate;
     barriers.FinishDate = finishDate;
     return barriers;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Barriers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToBarriers(Barriers barriers)
 {
     base.AddObject("Barriers", barriers);
 }