Ejemplo n.º 1
0
 protected override void DoLoadSourceState(IVsaPersistSite site){
 }
Ejemplo n.º 2
0
	public virtual void SaveSourceState(IVsaPersistSite site)
			{
				lock(this)
				{
					Preconditions(Pre.EngineNotClosed |
								  Pre.EngineNotRunning |
								  Pre.EngineInitialized);
					if(site != null)
					{
						try
						{
							DoSaveSourceState(site);
						}
						catch(VsaException)
						{
							throw;
						}
						catch(Exception e)
						{
							// Wrap the exception and re-throw.
							throw new VsaException(VsaError.SaveElementFailed,
												   e.ToString(), e);
						}
					}
					else
					{
						throw new VsaException(VsaError.SiteInvalid);
					}
				}
			}
Ejemplo n.º 3
0
	// Internal implementation of "SaveSourceState".
	protected abstract void DoSaveSourceState(IVsaPersistSite site);
Ejemplo n.º 4
0
 protected override void DoSaveSourceState(IVsaPersistSite site){
   XmlDocument project = new XmlDocument();
   project.LoadXml("<project></project>");
   XmlElement root = project.DocumentElement;
   this.SaveProjectVersion(project, root);
   this.SaveVsaEngineState(project, root);
   site.SaveElement(null, project.OuterXml);
   this.SaveSourceForDebugging();
   this.isEngineDirty = false;
 }
Ejemplo n.º 5
0
	public virtual void LoadSourceState(IVsaPersistSite site)
			{
				lock(this)
				{
					Preconditions(Pre.EngineNotClosed |
								  Pre.EngineNotInitialized |
								  Pre.RootMonikerSet |
								  Pre.SiteSet);
					isEngineInitialized = true;
					try
					{
						DoLoadSourceState(site);
					}
					catch
					{
						// Reset the "isEngineInitialized" flag.
						isEngineInitialized = true;
						throw;
					}
					isEngineDirty = true;
				}
			}
Ejemplo n.º 6
0
 public virtual void SaveSourceState(IVsaPersistSite site){
   this.TryObtainLock();
   try{
     Preconditions(Pre.EngineNotClosed | Pre.EngineNotRunning | Pre.EngineInitialised);
     if (site == null)
       throw Error(VsaError.SiteInvalid);
     try{
       DoSaveSourceState(site);
     }catch(Exception e){
       throw new VsaException(VsaError.SaveElementFailed, e.ToString(), e);
     }
   }finally{
     this.ReleaseLock();
   }
 }
Ejemplo n.º 7
0
      protected override void DoLoadSourceState(IVsaPersistSite site){
        // DoSaveSourceState puts everything in the project item (use null for the name)
        // We assume the site is valid and contains a valid project file so any errors are
        // wrapped in a VsaException and thrown
        string projectElement = site.LoadElement(null);
        try{
          XmlDocument project = new XmlDocument();
          project.LoadXml(projectElement);
          XmlElement root = project.DocumentElement;

          // verify that we support this version of the project file
          if (this.LoadProjectVersion(root) == CurrentProjectVersion){
            this.LoadVsaEngineState(root);
            this.isEngineDirty = false;
          }
        }catch(Exception e){
          throw new VsaException(VsaError.UnknownError, e.ToString(), e);
        }catch{
          throw new VsaException(VsaError.UnknownError);
        }
      }
 public virtual void SaveSourceState(IVsaPersistSite Site)
 {
 }
Ejemplo n.º 9
0
 public virtual void LoadSourceState(IVsaPersistSite site){
   this.TryObtainLock();
   try{
     Preconditions(Pre.EngineNotClosed |
                   Pre.EngineNotInitialised |
                   Pre.RootMonikerSet |
                   Pre.SiteSet);
     this.isEngineInitialized = true;
     try{
       this.DoLoadSourceState(site);
     }catch{
       this.isEngineInitialized = false;
       throw;
     }
     this.isEngineDirty = false;
   }finally{
     this.ReleaseLock();
   }
 }
 public virtual void LoadSourceState(IVsaPersistSite Site)
 {
 }
Ejemplo n.º 11
0
	// Internal implementation of "SaveSourceState".
	protected override void DoSaveSourceState(IVsaPersistSite site)
			{
				// Nothing to do here - source saving is not supported.
			}
Ejemplo n.º 12
0
	// Internal implementation of "LoadSourceState".
	protected override void DoLoadSourceState(IVsaPersistSite site)
			{
				// Nothing to do here - source loading is not supported.
			}
Ejemplo n.º 13
0
		public virtual void SaveSourceState (IVsaPersistSite site)
		{
			throw new NotImplementedException ();
		}
Ejemplo n.º 14
0
	public void SaveSourceState(IVsaPersistSite site)
			{
				throw new NotSupportedException();
			}