Exemplo n.º 1
0
 public void Publish(IProgressMonitor monitor, PublishInfo info)
 {
     if (!Directory.Exists(info.PublishDirectory))
     {
         Directory.CreateDirectory(info.PublishDirectory);
     }
 }
Exemplo n.º 2
0
 protected override void OnPublish(IProgressMonitor monitor, PublishInfo info)
 {
     if (this.Content == null)
     {
         return;
     }
     this.Content.Publish(monitor, info);
 }
Exemplo n.º 3
0
 protected virtual void OnPublish(IProgressMonitor monitor, PublishInfo info)
 {
     if (!this.CheckInitialize(monitor) || !this.CheckDestinationDirectory(monitor, info))
     {
         return;
     }
     info.SourceFilePath = (string)this.FileName;
     this.projectItem.Publish(monitor, info);
 }
Exemplo n.º 4
0
        public string SerializeGameProject(PublishInfo info, IProjectFile projFile)
        {
            IGameProjectSerializer currentSerializer = this.SerializeManager.CurrentSerializer;

            if (currentSerializer == null)
            {
                return("There is no publisher");
            }
            return(currentSerializer.Serialize(info, projFile));
        }
Exemplo n.º 5
0
 public void Publish(IProgressMonitor monitor, PublishInfo info)
 {
     try
     {
         this.OnPublish(monitor, info);
     }
     catch (Exception ex)
     {
         LogConfig.Logger.Error((object)"Run publish failed.", ex);
     }
 }
Exemplo n.º 6
0
 public void Publish(IProgressMonitor monitor, PublishInfo info)
 {
     try
     {
         this.OnPublish(monitor, info);
     }
     catch (Exception ex)
     {
         string message = string.Format("Project {0} publish failed, the error is {1}", (object)this.FullPath, (object)ex.Message);
         monitor.ReportError(message, ex);
     }
 }
Exemplo n.º 7
0
        protected bool CheckDestinationDirectory(IProgressMonitor monitor, PublishInfo info)
        {
            FilePath absolute = this.FileName.ToRelative(ProjectsService.Instance.CurrentSolution.ItemDirectory).ToAbsolute((FilePath)info.PublishDirectory);

            info.DestinationFilePath = (string)absolute;
            string parentDirectory = (string)absolute.ParentDirectory;

            if (!Directory.Exists(parentDirectory))
            {
                try
                {
                    Directory.CreateDirectory(parentDirectory);
                }
                catch (Exception ex)
                {
                    string message = string.Format("Create directory {0} failed.", (object)parentDirectory);
                    monitor.ReportError(message, ex);
                    return(false);
                }
            }
            return(true);
        }
Exemplo n.º 8
0
 protected abstract void OnPublish(IProgressMonitor monitor, PublishInfo info);
Exemplo n.º 9
0
 public void Publish(IProgressMonitor monitor, PublishInfo info)
 {
     this.OnPublish(monitor, info);
 }
Exemplo n.º 10
0
 protected virtual void OnPublish(IProgressMonitor monitor, PublishInfo info)
 {
 }