예제 #1
0
        /// <summary>
        /// Called when a new child dataset should be added.
        /// </summary>
        /// <param name="projectFacade">The object that contains the methods that allow interaction with the project system.</param>
        /// <param name="datasetFacade">The object that contains the methods that allow interaction with a dataset.</param>
        /// <param name="timer">The function that creates and stores timing intervals.</param>
        private static void OnAddNewChild(ILinkToProjects projectFacade, DatasetFacade datasetFacade, Func <string, IDisposable> timer)
        {
            // If there is no dataset facade, then we're in
            // designer mode, or something else silly.
            if (datasetFacade == null)
            {
                return;
            }

            using (timer("Add dataset to graph"))
            {
                datasetFacade.AddChild();
                projectFacade.ActiveProject().History.Mark();
            }
        }
예제 #2
0
 /// <summary>
 /// Adds a new child.
 /// </summary>
 /// <returns>
 /// The newly created dataset.
 /// </returns>
 public ScriptBackEndDatasetFacade AddChild()
 {
     return(new ScriptBackEndDatasetFacade(m_Dataset.AddChild()));
 }