VsTeXProject.VisualStudio.Project.ProjectNode.SetProjectFileDirty C# (CSharp) Метод

SetProjectFileDirty() публичный Метод

Set dirty state of project
public SetProjectFileDirty ( bool value ) : void
value bool boolean value indicating dirty state
Результат void
        public void SetProjectFileDirty(bool value)
        {
            isDirty = value;
            if (isDirty)
            {
                lastModifiedTime = DateTime.Now;
                buildIsPrepared = false;
            }
        }

Usage Example

Пример #1
0
        /// <summary>
        ///     Constructor to create a new MSBuild.ProjectItem and add it to the project
        ///     Only have internal constructors as the only one who should be creating
        ///     such object is the project itself (see Project.CreateFileNode()).
        /// </summary>
        internal ProjectElement(ProjectNode project, string itemPath, string itemType)
        {
            if (project == null)
            {
                throw new ArgumentNullException("project");
            }

            if (string.IsNullOrEmpty(itemPath))
            {
                throw new ArgumentException(
                    SR.GetString(SR.ParameterCannotBeNullOrEmpty, CultureInfo.CurrentUICulture), "itemPath");
            }


            if (string.IsNullOrEmpty(itemType))
            {
                throw new ArgumentException(
                    SR.GetString(SR.ParameterCannotBeNullOrEmpty, CultureInfo.CurrentUICulture), "itemType");
            }

            itemProject = project;

            // create and add the item to the project

            Item = project.BuildProject.AddItem(itemType, MSBuild.ProjectCollection.Escape(itemPath))[0];
            itemProject.SetProjectFileDirty(true);
            RefreshProperties();
        }
ProjectNode