コード例 #1
0
        /// <summary>
        /// Adds an entity to the schedule, indicating that the schedule should be formatted by this tool.
        /// </summary>
        /// <param name="viewSchedule">The schedule.</param>
        /// <param name="schema">The schema used for the entity.</param>
        private void AddMarkerEntity(ViewSchedule viewSchedule, Schema schema)
        {
            // Is entity already present?
            Entity entity = viewSchedule.GetEntity(schema);

            // If not, add it.
            if (!entity.IsValid())
            {
                entity = new Entity(schema);
                entity.Set <bool>("Formatted", true);
                viewSchedule.SetEntity(entity);
            }
        }