コード例 #1
0
ファイル: ActionLog.cs プロジェクト: emtees/old-code
	    public ItemEnumerator (ActionLog owner)
	    {
		this.owner = owner;

		saved_nextitem = owner.nextitem;
		Reset ();
	    }
コード例 #2
0
ファイル: ActionLog.cs プロジェクト: retahc/old-code
            public ItemEnumerator(ActionLog owner)
            {
                this.owner = owner;

                saved_nextitem = owner.nextitem;
                Reset();
            }
コード例 #3
0
ファイル: ActionLog.cs プロジェクト: retahc/old-code
        public static ActionLog Load(SourceSettings ss, IWarningLogger uilog)
        {
            ActionLog ld = null;

            if (uilog == null)
            {
                throw new ArgumentNullException();
            }

            string path = ss.PathToStateItem(LogName);

            if (File.Exists(path))
            {
                ld = (ActionLog)SafeFileSerializer.Load(path, uilog);
            }

            if (ld == null)
            {
                // Didn't exist or failed to recover
                ld = new ActionLog();
            }

            ld.uilog = uilog;
            return(ld);
        }
コード例 #4
0
ファイル: ProjectManager.cs プロジェクト: retahc/old-code
        public void Dispose()
        {
            if (disposed)
            {
                return;
            }

            if (proj != null)
            {
                proj.Dispose();
                proj = null;
            }

            if (log != null)
            {
                log.Save(ss);
                log = null;
            }

            if (ProfileStateUsage)
            {
                Console.Error.WriteLine("GRAPH STATE USAGE PROFILE:");
                Console.Error.WriteLine("{0}", graph);
            }

            graph = null;
            ss    = null;
            bm    = null;

            disposed = true;
        }
コード例 #5
0
ファイル: WrenchProject.cs プロジェクト: emtees/old-code
	public WrenchProject (SourceSettings ss, IGraphState graph, 
			      ActionLog log) 
	{
	    this.ss = ss;
	    this.log = log;
	    this.graph = graph;
	    this.manager = WrenchOperations.MakeManager (this);
	}
コード例 #6
0
ファイル: WrenchProject.cs プロジェクト: retahc/old-code
 public WrenchProject(SourceSettings ss, IGraphState graph,
                      ActionLog log)
 {
     this.ss      = ss;
     this.log     = log;
     this.graph   = graph;
     this.manager = WrenchOperations.MakeManager(this);
 }
コード例 #7
0
ファイル: ProjectManager.cs プロジェクト: emtees/old-code
	public bool LoadRest (IWarningLogger uilog) 
	{
	    if ((log = ActionLog.Load (ss, uilog)) == null)
		return true;

	    if ((graph = GetGraph ()) == null)
		return true;

	    if (ProfileStateUsage)
		graph = new GraphStateProfiler (graph);

	    proj = new WrenchProject (ss, graph, log);
	    return false;
	}
コード例 #8
0
ファイル: ProjectManager.cs プロジェクト: retahc/old-code
        public bool LoadRest(IWarningLogger uilog)
        {
            if ((log = ActionLog.Load(ss, uilog)) == null)
            {
                return(true);
            }

            if ((graph = GetGraph()) == null)
            {
                return(true);
            }

            if (ProfileStateUsage)
            {
                graph = new GraphStateProfiler(graph);
            }

            proj = new WrenchProject(ss, graph, log);
            return(false);
        }
コード例 #9
0
ファイル: ProjectManager.cs プロジェクト: emtees/old-code
	public void Dispose () {
	    if (disposed)
		return;
	    
	    if (proj != null) {
		proj.Dispose ();
		proj = null;
	    }

	    if (log != null) {
		log.Save (ss);
		log = null;
	    }

	    if (ProfileStateUsage) {
		Console.Error.WriteLine ("GRAPH STATE USAGE PROFILE:");
		Console.Error.WriteLine ("{0}", graph);
	    }

	    graph = null;
	    ss = null;
	    bm = null;

	    disposed = true;
	}
コード例 #10
0
ファイル: ActionLog.cs プロジェクト: emtees/old-code
	public static ActionLog Load (SourceSettings ss, IWarningLogger uilog)
	{
	    ActionLog ld = null;

	    if (uilog == null)
		throw new ArgumentNullException ();

	    string path = ss.PathToStateItem (LogName);

	    if (File.Exists (path))
		ld = (ActionLog) SafeFileSerializer.Load (path, uilog);

	    if (ld == null)
		// Didn't exist or failed to recover
		ld = new ActionLog ();

	    ld.uilog = uilog;
	    return ld;
	}