#pragma warning disable 1998
        public override async Task ExecuteAsync()
        {
            __tagHelperRunner       = __tagHelperRunner ?? new global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner();
            __tagHelperScopeManager = __tagHelperScopeManager ?? new global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope);
            Instrumentation.BeginContext(31, 2, true);
            WriteLiteral("\r\n");
            Instrumentation.EndContext();
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => {
                Instrumentation.BeginContext(71, 11, true);
                WriteLiteral("Body of Tag");
                Instrumentation.EndContext();
            }
                                                                        );
            __TestNamespace_PTagHelper = CreateTagHelper <global::TestNamespace.PTagHelper>();
            __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
#line 4 "SingleTagHelperWithNewlineBeforeAttributes.cshtml"
            __TestNamespace_PTagHelper.Age = 1337;

#line default
#line hidden
            __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Instrumentation.BeginContext(33, 53, false);
            Write(__tagHelperExecutionContext.Output);
            Instrumentation.EndContext();
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
        }
        #pragma warning disable 1998
        public override async Task ExecuteAsync()
        {
            __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner();
            Instrumentation.BeginContext(33, 2, true);
            WriteLiteral("\r\n");
            Instrumentation.EndContext();
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => {
                Instrumentation.BeginContext(73, 11, true);
                WriteLiteral("Body of Tag");
                Instrumentation.EndContext();
            }
                                                                        , StartTagHelperWritingScope, EndTagHelperWritingScope);
            __PTagHelper = CreateTagHelper <PTagHelper>();
            __tagHelperExecutionContext.Add(__PTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw("Hello World"));
#line 4 "SingleTagHelperWithNewlineBeforeAttributes.cshtml"
            __PTagHelper.Age = 1337;

#line default
#line hidden
            __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age);
            __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            Instrumentation.BeginContext(35, 53, false);
            await WriteTagHelperAsync(__tagHelperExecutionContext);

            Instrumentation.EndContext();
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
        }
Пример #3
0
            }   // end of EditWorldParametersUpdateObj Activate()

            public override void Deactivate()
            {
                if (active)
                {
                    shared.editWorldParameters.Deactivate(false);
                    HelpOverlay.Pop();

                    if (EditWorldParameters.CameraSetMode)
                    {
                        parent.CurrentUpdateMode = UpdateMode.EditObject;
                    }
                    else if (EditWorldParameters.NextLevelMode)
                    {
                        parent.CurrentUpdateMode = UpdateMode.SelectNextLevel;
                    }
                    else if (shared.editWorldParameters.IsInProgrammingTileMode())
                    {
                        parent.CurrentUpdateMode = UpdateMode.EditObject;
                    }
                    else
                    {
                        parent.CurrentUpdateMode = UpdateMode.ToolMenu;
                    }

                    Instrumentation.StopTimer(timerInstrument);

                    base.Deactivate();
                }
            }
Пример #4
0
        override public void Activate()
        {
            if (state != States.Active)
            {
                // Do stack handling here.  If we do it in the update object we have no
                // clue which order things get pushed and popped and madness ensues.
                CommandStack.Push(commandMap);

                pendingState             = States.Active;
                BokuGame.objectListDirty = true;

                saveChangesActivated = false;

                HelpOverlay.ToolIcon = null;

                InGame.inGame.RenderWorldAsThumbnail = true;

                timerInstrument = Instrumentation.StartTimer(Instrumentation.TimerId.MiniHubTime);

                Foley.PlayMenuLoop();

                Time.Paused = true;

                AuthUI.ShowStatusDialog();
            }
        }
Пример #5
0
 public WMIDataStoreProvider(string datastoreName) : base()
 {
     instanceProvidersBase = WMIDataStoreProviders.Instance();
     Name = datastoreName;
     instanceProvidersBase.AddDataStoreInfo(Name, false);
     Instrumentation.Publish(this);
 }
Пример #6
0
        public void dispatchExit(HiddenFunctionId hiddenFunctionId, ImmutableNodeReferer resultOfCall)
        {
            if (!privateEnabledTimingInstrumentation)
            {
                return;
            }

            sw.Stop();
            double ticks     = sw.ElapsedTicks;
            long   elapsedNs = (long)((ticks / Stopwatch.Frequency) * 1000000000);

            Instrumentation instrumentation = countersDictionary[hiddenFunctionId];

            if (instrumentation.toIgnoreCounter == 0)
            {
                instrumentation.statisticsCalltimeSumInNs += elapsedNs;
                instrumentation.statisticsCalltimeMaxInNs  = Math.Max(elapsedNs, instrumentation.statisticsCalltimeMaxInNs);
                // needs special handling for the case when it's the first call
                if (instrumentation.callcounter == 1)
                {
                    instrumentation.statisticsCalltimeMinInNs = elapsedNs;
                }
                else
                {
                    instrumentation.statisticsCalltimeMinInNs = Math.Min(elapsedNs, instrumentation.statisticsCalltimeMinInNs);
                }
            }
        }
Пример #7
0
 public static void Fire(string deviceName, bool ready)
 {
     if (WmiProvider.Instance.EnableEvents)
     {
         Instrumentation.Fire(new WmiOnReadynessChangedEvent(deviceName, ready));
     }
 }
Пример #8
0
 public SentenceInfo(string key, String sqlSentence)
 {
     this.sqlSentence = sqlSentence;
     this.name        = key;
     sentenceCount    = 0;
     Instrumentation.Publish(this);
 }
Пример #9
0
 public void RevokeInformer(WmiReadynessInformer obj, bool force = false)
 {
     if (!ContainsInformer(obj))
     {
         throw new ArgumentException("Informer with specified ApplicationName has not been published through this provider.");
     }
     try
     {
         if (obj.GetType().GetCustomAttributes(typeof(ManagementEntityAttribute), false).Any())
         {
             InstrumentationManager.Revoke(obj);
         }
         else
         {
             Instrumentation.Revoke(obj);
         }
     }
     catch (Exception ex)
     {
         if (!force)
         {
             throw ex;
         }
     }
     _pub.Remove(obj.ApplicationName);
 }
Пример #10
0
        public override Instrumentation CreateInstrument(TestContext ctx)
        {
            var instrumentation = new Instrumentation();

            instrumentation.SignatureInstrument = new SignatureInstrument(ctx, this);
            return(instrumentation);
        }
Пример #11
0
        public IHttpActionResult PostInstrumentation(Instrumentation instrumentation)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.Instrumentations.Add(instrumentation);

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateException)
            {
                if (InstrumentationExists(instrumentation.InstrumentationId))
                {
                    return(Conflict());
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtRoute("DefaultApi", new { id = instrumentation.InstrumentationId }, instrumentation));
        }
Пример #12
0
 /// <summary>
 /// Revokes a published object. ArgumentException is thrown if the object has not been published by means of this provider.
 /// </summary>
 /// <param name="obj">The object has to be the one published through this provider class.</param>
 /// <param name="force">Suppresses WMI exceptions (but not ArgumentException) and forcefully clears internal list.</param>
 public void Revoke(IWmiHardwareEntity obj, bool force = false)
 {
     if (!Contains(obj))
     {
         throw new ArgumentException("IHardware object with specified HWID has not been published through this provider.");
     }
     try
     {
         if (obj.GetType().GetCustomAttributes(typeof(ManagementEntityAttribute), false).Any())
         {
             InstrumentationManager.Revoke(obj);
         }
         else
         {
             Instrumentation.Revoke(obj);
         }
     }
     catch (Exception ex)
     {
         if (!force)
         {
             throw ex;
         }
     }
     _pub.Remove(obj.Hwid);
 }
Пример #13
0
        public IHttpActionResult PutInstrumentation(long id, Instrumentation instrumentation)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != instrumentation.InstrumentationId)
            {
                return(BadRequest());
            }

            db.Entry(instrumentation).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!InstrumentationExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
Пример #14
0
        #pragma warning disable 1998
        public override async Task ExecuteAsync()
        {
#line 1 "MarkupInCodeBlock.cshtml"

            for (int i = 1; i <= 10; i++)
            {
#line default
#line hidden

                Instrumentation.BeginContext(40, 27, true);
                WriteLiteral("        <p>Hello from C#, #");
                Instrumentation.EndContext();
                Instrumentation.BeginContext(69, 12, false);
#line 3 "MarkupInCodeBlock.cshtml"
                Write(i.ToString());

#line default
#line hidden
                Instrumentation.EndContext();
                Instrumentation.BeginContext(82, 6, true);
                WriteLiteral("</p>\r\n");
                Instrumentation.EndContext();
#line 4 "MarkupInCodeBlock.cshtml"
            }

#line default
#line hidden

            Instrumentation.BeginContext(96, 2, true);
            WriteLiteral("\r\n");
            Instrumentation.EndContext();
        }
Пример #15
0
        #pragma warning disable 1998
        public override async Task ExecuteAsync()
        {
#line 1 "ImplicitExpression.cshtml"
            for (int i = 1; i <= 10; i++)
            {
#line default
#line hidden

                Instrumentation.BeginContext(33, 21, true);
                WriteLiteral("    <p>This is item #");
                Instrumentation.EndContext();
                Instrumentation.BeginContext(55, 1, false);
#line 2 "ImplicitExpression.cshtml"
                Write(i);

#line default
#line hidden
                Instrumentation.EndContext();
                Instrumentation.BeginContext(56, 6, true);
                WriteLiteral("</p>\r\n");
                Instrumentation.EndContext();
#line 3 "ImplicitExpression.cshtml"
            }

#line default
#line hidden
        }
Пример #16
0
            }   // end of RunSimUpdateObj Activate()

            public override void Deactivate()
            {
                if (active)
                {
                    active = false;

                    if (parent.cursorClone != null)
                    {
                        parent.cursorClone.Deactivate();
                        parent.cursorClone = null;
                    }
                    // Deactivate the PreGame if any.
                    if (parent.PreGame != null)
                    {
                        parent.PreGame.Active = false;
                    }

                    CommandStack.Pop(commandMap);
                    HelpOverlay.Pop();

                    Instrumentation.StopTimer(timerInstrument);

#if !NETFX_CORE
                    MicrobitManager.ReleaseDevices();
#endif

                    base.Deactivate();

                    //          ObjectAnalysis oa = new ObjectAnalysis();
                    //oa.beginAnalysis("out.txt");
                }
            }   // end of RunSimUpdateObj Deactivate()
Пример #17
0
 public static void Fire(string hwid)
 {
     if (WmiProvider.Instance.EnableEvents)
     {
         Instrumentation.Fire(new WmiOnStateChangedEvent(hwid));
     }
 }
Пример #18
0
        #pragma warning disable 1998
        public override async Task ExecuteAsync()
        {
#line 1 "CodeBlockWithTextElement.cshtml"

            var a = 1;

#line default
#line hidden

            Instrumentation.BeginContext(25, 3, true);
            WriteLiteral("foo");
            Instrumentation.EndContext();
#line 2 "CodeBlockWithTextElement.cshtml"

            var b = 1;

#line default
#line hidden

            Instrumentation.BeginContext(63, 4, true);
            WriteLiteral("bar ");
            Instrumentation.EndContext();
            Instrumentation.BeginContext(69, 3, false);
#line 3 "CodeBlockWithTextElement.cshtml"
            Write(a + b);

#line default
#line hidden
            Instrumentation.EndContext();
#line 3 "CodeBlockWithTextElement.cshtml"


#line default
#line hidden
        }
Пример #19
0
        Strong(string s)
        {
#line default
#line hidden
            return(new Template((__razor_helper_writer) => {
#line 1 "Instrumented.cshtml"


#line default
#line hidden

                Instrumentation.BeginContext(28, 12, true);
                WriteLiteralTo(__razor_helper_writer, "    <strong>");
                Instrumentation.EndContext();
                Instrumentation.BeginContext(41, 1, false);
#line 2 "Instrumented.cshtml"
                WriteTo(__razor_helper_writer, s);

#line default
#line hidden
                Instrumentation.EndContext();
                Instrumentation.BeginContext(42, 11, true);
                WriteLiteralTo(__razor_helper_writer, "</strong>\r\n");
                Instrumentation.EndContext();
#line 3 "Instrumented.cshtml"

#line default
#line hidden
            }
                                ));

#line 3 "Instrumented.cshtml"
        }
Пример #20
0
        Italic(string s)
        {
#line default
#line hidden
            return(new Template((__razor_helper_writer) => {
#line 6 "Helpers.cshtml"

                s = s.ToUpper();

#line default
#line hidden

                Instrumentation.BeginContext(128, 8, true);
                WriteLiteralTo(__razor_helper_writer, "    <em>");
                Instrumentation.EndContext();
                Instrumentation.BeginContext(137, 1, false);
#line 8 "Helpers.cshtml"
                WriteTo(__razor_helper_writer, s);

#line default
#line hidden
                Instrumentation.EndContext();
                Instrumentation.BeginContext(138, 7, true);
                WriteLiteralTo(__razor_helper_writer, "</em>\r\n");
                Instrumentation.EndContext();
#line 9 "Helpers.cshtml"

#line default
#line hidden
            }
                                ));

#line 9 "Helpers.cshtml"
        }
Пример #21
0
        Bold(string s)
        {
#line default
#line hidden
            return(new Template((__razor_helper_writer) => {
#line 1 "Helpers.cshtml"

                s = s.ToUpper();

#line default
#line hidden

                Instrumentation.BeginContext(48, 12, true);
                WriteLiteralTo(__razor_helper_writer, "    <strong>");
                Instrumentation.EndContext();
                Instrumentation.BeginContext(61, 1, false);
#line 3 "Helpers.cshtml"
                WriteTo(__razor_helper_writer, s);

#line default
#line hidden
                Instrumentation.EndContext();
                Instrumentation.BeginContext(62, 11, true);
                WriteLiteralTo(__razor_helper_writer, "</strong>\r\n");
                Instrumentation.EndContext();
#line 4 "Helpers.cshtml"

#line default
#line hidden
            }
                                ));

#line 4 "Helpers.cshtml"
        }
        internal static MatchingTransactions getMatchingTransactions(HttpResponseMessage responce)
        {
            var matchingTransactions = new MatchingTransactions();
            var jsonObj =
                JsonConvert.DeserializeObject <Dictionary <string, object> >(responce.Content.ReadAsStringAsync().Result);

            if (jsonObj.ContainsKey("matching_transactions"))
            {
                var transArray =
                    JsonConvert.DeserializeObject <List <object> >(jsonObj["matching_transactions"].ToString());
                foreach (var transactionObj in transArray)
                {
                    var transaction = new Transaction();
                    transaction = JsonConvert.DeserializeObject <Transaction>(transactionObj.ToString());
                    matchingTransactions.Add(transaction);
                }
            }
            if (jsonObj.ContainsKey("page_context"))
            {
                var pageContext = new PageContext();
                pageContext = JsonConvert.DeserializeObject <PageContext>(jsonObj["page_context"].ToString());
                matchingTransactions.page_context = pageContext;
            }
            if (jsonObj.ContainsKey("instrumentation"))
            {
                var instrumentation = new Instrumentation();
                instrumentation = JsonConvert.DeserializeObject <Instrumentation>(jsonObj["instrumentation"].ToString());
                matchingTransactions.instrumentation = instrumentation;
            }
            return(matchingTransactions);
        }
Пример #23
0
        private void ComputerHardwareAdded(IHardware hardware)
        {
            if (!Exists(hardware.Identifier.ToString()))
            {
                foreach (ISensor sensor in hardware.Sensors)
                {
                    HardwareSensorAdded(sensor);
                }

                hardware.SensorAdded   += HardwareSensorAdded;
                hardware.SensorRemoved += HardwareSensorRemoved;

                Hardware hw = new Hardware(hardware);
                _activeInstances.Add(hw);

                try
                {
                    Instrumentation.Publish(hw);
                }
                catch { }
            }

            foreach (IHardware subHardware in hardware.SubHardware)
            {
                ComputerHardwareAdded(subHardware);
            }
        }
Пример #24
0
 private void PublishCache()
 {
     foreach (var v in _cache)
     {
         Instrumentation.Publish(v);
     }
 }
Пример #25
0
        #pragma warning disable 1998
        public override async Task ExecuteAsync()
        {
            Instrumentation.BeginContext(68, 2, true);
            WriteLiteral("\r\n");
            Instrumentation.EndContext();
            Instrumentation.BeginContext(166, 30, true);
            WriteLiteral("\r\n<p>Path\'s full type name is ");
            Instrumentation.EndContext();
            Instrumentation.BeginContext(197, 21, false);
#line 9 "Imports.cshtml"
            Write(typeof(Path).FullName);

#line default
#line hidden
            Instrumentation.EndContext();
            Instrumentation.BeginContext(218, 40, true);
            WriteLiteral("</p>\r\n<p>Foo\'s actual full type name is ");
            Instrumentation.EndContext();
            Instrumentation.BeginContext(259, 20, false);
#line 10 "Imports.cshtml"
            Write(typeof(Foo).FullName);

#line default
#line hidden
            Instrumentation.EndContext();
            Instrumentation.BeginContext(279, 4, true);
            WriteLiteral("</p>");
            Instrumentation.EndContext();
        }
Пример #26
0
        #pragma warning disable 1998
        public override async Task ExecuteAsync()
        {
            __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner();
            Instrumentation.BeginContext(33, 2, true);
            WriteLiteral("\r\n");
            Instrumentation.EndContext();
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => {
            }
                                                                        , StartTagHelperWritingScope, EndTagHelperWritingScope);
            __InputTagHelper = CreateTagHelper <InputTagHelper>();
            __tagHelperExecutionContext.Add(__InputTagHelper);
            __InputTagHelper.Type = "checkbox";
            __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type);
#line 3 "DuplicateTargetTagHelper.cshtml"
            __InputTagHelper.Checked = true;

#line default
#line hidden
            __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper.Checked);
            __CatchAllTagHelper = CreateTagHelper <CatchAllTagHelper>();
            __tagHelperExecutionContext.Add(__CatchAllTagHelper);
            __CatchAllTagHelper.Type           = __InputTagHelper.Type;
            __CatchAllTagHelper.Checked        = __InputTagHelper.Checked;
            __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
            await WriteTagHelperAsync(__tagHelperExecutionContext);

            __tagHelperExecutionContext = __tagHelperScopeManager.End();
        }
Пример #27
0
        #pragma warning disable 1998
        public override async Task ExecuteAsync()
        {
            __tagHelperRunner       = __tagHelperRunner ?? new global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner();
            __tagHelperScopeManager = __tagHelperScopeManager ?? new global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope);
            Instrumentation.BeginContext(31, 2, true);
            WriteLiteral("\r\n");
            Instrumentation.EndContext();
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => {
            }
                                                                        );
            __TestNamespace_InputTagHelper = CreateTagHelper <global::TestNamespace.InputTagHelper>();
            __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
            __TestNamespace_CatchAllTagHelper = CreateTagHelper <global::TestNamespace.CatchAllTagHelper>();
            __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper);
            __TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
            __TestNamespace_CatchAllTagHelper.Type = __TestNamespace_InputTagHelper.Type;
#line 3 "DuplicateTargetTagHelper.cshtml"
            __TestNamespace_InputTagHelper.Checked = true;

#line default
#line hidden
            __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            __TestNamespace_CatchAllTagHelper.Checked = __TestNamespace_InputTagHelper.Checked;
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            Instrumentation.BeginContext(33, 40, false);
            Write(__tagHelperExecutionContext.Output);
            Instrumentation.EndContext();
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
        }
Пример #28
0
        #pragma warning disable 1998
        public override async Task ExecuteAsync()
        {
#line 1 "Sections.cshtml"

            Layout = "_SectionTestLayout.cshtml"

#line default
#line hidden

                     Instrumentation.BeginContext(47, 33, true);
            WriteLiteral("\r\n\r\n<div>This is in the Body>\r\n\r\n");
            Instrumentation.EndContext();
            DefineSection("Section2", async(__razor_template_writer) => {
                Instrumentation.BeginContext(99, 39, true);
                WriteLiteralTo(__razor_template_writer, "\r\n    <div>This is in Section 2</div>\r\n");
                Instrumentation.EndContext();
            }
                          );
            Instrumentation.BeginContext(141, 2, true);
            WriteLiteral("\r\n");
            Instrumentation.EndContext();
            DefineSection("Section1", async(__razor_template_writer) => {
                Instrumentation.BeginContext(162, 39, true);
                WriteLiteralTo(__razor_template_writer, "\r\n    <div>This is in Section 1</div>\r\n");
                Instrumentation.EndContext();
            }
                          );
        }
Пример #29
0
        public override void OnActivate()
        {
            timerInstrument = Instrumentation.StartTimer(Instrumentation.TimerId.InGameSmoothLevelTool);
            base.OnActivate();

            PickerX = brushPicker;      // Assign X button to brush picker and activate.

            // If the location of the cursor is not over any terrain then
            // don't allow the magic brush as the default.
            if (Terrain.GetTerrainHeightFlat(Boku.InGame.inGame.Cursor3D.Position) == 0.0f)
            {
                // By not including the magic brush in the brush set we
                // force the picker to change the current brush to one
                // of the standard brushes if not already.
                brushPicker.BrushSet = Brush2DManager.BrushType.Binary;
            }

            brushPicker.BrushSet = Brush2DManager.BrushType.Binary
                                   | Brush2DManager.BrushType.Selection;
            brushPicker.UseAltOverlay = true;

            inGame.Terrain.LevelHeight = Terrain.GetTerrainHeightFlat(shared.editBrushPosition);

            PickerY = materialPicker; // Assign Y button to material picker and activate.
        }                             // end of OnActivate()
Пример #30
0
            public override void Activate()
            {
                if (!active)
                {
                    active = true;

                    CommandStack.Push(commandMap);
                    HelpOverlay.Push("RunSimulation");

                    // Wake everything up.
                    parent.ActivateAllGameThings();

                    // This is commented out since it was removing Creatables from the level
                    // when it shouldn't.  In particular if you restart Kodu, find a level in
                    // the LoadLevelMenu, and choose Edit, it would remove all the creatables.
                    // Running and then editing would restore them so it's not peristing the
                    // removal.
                    // Normally I'd just delete the line but if this change starts causing issues
                    // it might help to know this was here.  If it's now 2019 or later you can
                    // probably feel free to remove this.  :-)
                    //parent.RemoveCreatablesFromScene();

                    timerInstrument = Instrumentation.StartTimer(Instrumentation.TimerId.InGameRunSim);

#if !NETFX_CORE
                    // Refresh the list of attached microbits.
                    {
                        System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(MicrobitManager.RefreshWorker));
                        t.Start();
                    }
#endif

                    // Be sure all Auth UI is hidden.
                    AuthUI.HideAllDialogs();

                    base.Activate();
                }

                if (Program2.CmdLine.Exists("analytics"))
                {
#if !NETFX_CORE
                    Console.WriteLine("Begin Analytics");
#endif
                    ObjectAnalysis oa = new ObjectAnalysis();
                    oa.beginAnalysis(MainMenu.StartupWorldFilename.ToString());


                    //  GamePadInput.stopActiveInputTimer();

                    //deactivate the menu on exit to stop the timer
                    Deactivate();

                    // Wave bye, bye.
#if NETFX_CORE
                    Windows.UI.Xaml.Application.Current.Exit();
#else
                    BokuGame.bokuGame.Exit();
#endif
                }
            }   // end of RunSimUpdateObj Activate()
		public override Instrumentation CreateInstrument (TestContext ctx)
		{
			var instrumentation = new Instrumentation ();

			var settings = new UserSettings ();

			instrumentation.SettingsInstrument = new ConnectionInstrument (settings, ctx, this);
			if (Parameters.HandshakeInstruments != null)
				instrumentation.HandshakeInstruments.UnionWith (Parameters.HandshakeInstruments);
			return instrumentation;
		}
		public sealed override Instrumentation CreateInstrument (TestContext ctx)
		{
			var instrumentation = new Instrumentation ();

			var settings = new UserSettings ();
			settings.EnableDebugging = Parameters.EnableDebugging;
			var connectionInstrument = CreateConnectionInstrument (ctx, settings);

			instrumentation.SettingsInstrument = connectionInstrument;
			instrumentation.EventSink = connectionInstrument.EventSink;

			if (Parameters.HandshakeInstruments != null)
				instrumentation.HandshakeInstruments.UnionWith (Parameters.HandshakeInstruments);

			return instrumentation;
		}
Пример #33
0
 public void AddToInstrumentations(Instrumentation instrumentation)
 {
     base.AddObject("Instrumentations", instrumentation);
 }
Пример #34
0
 public static Instrumentation CreateInstrumentation(int instrumentationId, string name)
 {
     Instrumentation instrumentation = new Instrumentation();
     instrumentation.InstrumentationId = instrumentationId;
     instrumentation.Name = name;
     return instrumentation;
 }
		public override Instrumentation CreateInstrument (TestContext ctx)
		{
			var instrumentation = new Instrumentation ();
			instrumentation.SignatureInstrument = new SignatureInstrument (ctx, this);
			return instrumentation;
		}