Exemplo n.º 1
0
        public static void Begin(string s, Stream stream, bool autoClosing)
        {
            if (!hasClosed && profiles.ContainsKey(lastOpen))
            {
                End(lastOpen, stream);
            }

            ProfileSizePoint p = new ProfileSizePoint();

            if (!profiles.ContainsKey(s))
            {
                profiles[s] = new ProfileSizePoint();
            }
            else
            {
                p = profiles[s];
            }

            if (p.open)
            {
                Debug.LogWarning("Opening an already open entry (" + s + ")");
            }

            p.lastBegin = stream.Position;
            p.open      = true;

            if (autoClosing)
            {
                hasClosed = false;
                lastOpen  = s;
            }

            profiles[s] = p;
        }
Exemplo n.º 2
0
		public static void Begin (string s, Stream stream, bool autoClosing) {
			
			if (!hasClosed && profiles.ContainsKey(lastOpen)) {
				End (lastOpen, stream);
			}
			
			ProfileSizePoint p = new ProfileSizePoint ();
			
			if (!profiles.ContainsKey (s)) {
				profiles[s] = new ProfileSizePoint ();
			} else {
				p = profiles[s];
			}
			
			if (p.open) {
				Debug.LogWarning ("Opening an already open entry ("+s+")");
			}
			
			p.lastBegin = stream.Position;
			p.open = true;
			
			if (autoClosing) {
				hasClosed = false;
				lastOpen = s;
			}
			
			profiles[s] = p;
		}