コード例 #1
0
    public static string ToCode(ref byte[] Array, uint Ident = 0U, uint MaxPerLine = 0U, bool Decorate = false, bool SkipIdentFirst = true)
    {
        if (Array == null || Array.Length == 0)
        {
            Array = new byte[] { 0 };
        }
        global::System.Text.StringBuilder b = new System.Text.StringBuilder(Array.Length * 4 + 1024);
        if (Ident > 0U && !SkipIdentFirst)
        {
            b.Append(new string(' ', (int)Ident));
        }
        const string command = "return new byte[] { ";

        b.Append(command);
        Ident += (uint)command.Length;
        global::System.Collections.Generic.IEnumerator <byte> bEnum = (Array as global::System.Collections.Generic.IEnumerable <byte>).GetEnumerator();
        bEnum.MoveNext();
        b.Append(global::ByteToCodeCS.ToString(bEnum.Current, Decorate));
        uint   cnt  = 1U;
        string lBrk = new string(' ', (int)Ident);

        while (bEnum.MoveNext())
        {
            b.Append(',');
            if (MaxPerLine > 0U && cnt == MaxPerLine)
            {
                cnt = 1U;
                b.AppendLine();
                b.Append(lBrk);
            }
            else
            {
                b.Append(' ');
            }
            b.Append(global::ByteToCodeCS.ToString(bEnum.Current, Decorate));
        }
        b.Append(" };");
        return(b.ToString());
    }
コード例 #2
0
 // Token: 0x0600032A RID: 810 RVA: 0x0001175C File Offset: 0x0000F95C
 public static void DumpTable()
 {
     global::VRGIN.Core.VRLog.Info("DUMP", global::System.Array.Empty <object>());
     global::System.Text.StringBuilder stringBuilder = new global::System.Text.StringBuilder();
     global::System.Collections.Generic.IEnumerator <global::System.Collections.Generic.KeyValuePair <string, double> > enumerator = global::VRGIN.Core.ProtectedBehaviour.PerformanceTable.GetEnumerator();
     while (enumerator.MoveNext())
     {
         global::System.Text.StringBuilder stringBuilder2 = stringBuilder;
         string text = "{1}ms: {0}\n";
         global::System.Collections.Generic.KeyValuePair <string, double> keyValuePair = enumerator.Current;
         object key = keyValuePair.Key;
         keyValuePair = enumerator.Current;
         stringBuilder2.AppendFormat(text, key, keyValuePair.Value / (double)global::UnityEngine.Time.realtimeSinceStartup);
     }
     global::System.IO.File.WriteAllText("performance.txt", stringBuilder.ToString());
 }
コード例 #3
0
 public bool MoveNext()
 {
     return(enumeration.MoveNext());
 }
コード例 #4
0
 public static object ProMRDS_Simulation_JointMover_JointMoverState_TO_ProMRDS_Simulation_JointMover_Proxy_JointMoverState(object transformFrom)
 {
     global::ProMRDS.Simulation.JointMover.Proxy.JointMoverState target = new global::ProMRDS.Simulation.JointMover.Proxy.JointMoverState();
     global::ProMRDS.Simulation.JointMover.JointMoverState       from   = ((global::ProMRDS.Simulation.JointMover.JointMoverState)(transformFrom));
     global::System.Collections.Generic.Dictionary <string, global:: ProMRDS.Simulation.JointMover.DOFDesc>           tmp  = from.Joints;
     global::Microsoft.Dss.Core.Utilities.DssDictionary <string, global::ProMRDS.Simulation.JointMover.Proxy.DOFDesc> tmp0 = default(global::Microsoft.Dss.Core.Utilities.DssDictionary <string, global::ProMRDS.Simulation.JointMover.Proxy.DOFDesc>);
     if ((tmp != null))
     {
         tmp0 = new global::Microsoft.Dss.Core.Utilities.DssDictionary <string, global::ProMRDS.Simulation.JointMover.Proxy.DOFDesc>();
         for (global::System.Collections.Generic.IEnumerator <string> iterator = tmp.Keys.GetEnumerator(); iterator.MoveNext();
              )
         {
             string tmp1 = default(string);
             global::ProMRDS.Simulation.JointMover.Proxy.DOFDesc tmp2 = default(global::ProMRDS.Simulation.JointMover.Proxy.DOFDesc);
             tmp1 = iterator.Current;
             global::ProMRDS.Simulation.JointMover.DOFDesc tmp3 = tmp[iterator.Current];
             if ((tmp3 != null))
             {
                 tmp2 = ((global::ProMRDS.Simulation.JointMover.Proxy.DOFDesc)(ProMRDS_Simulation_JointMover_DOFDesc_TO_ProMRDS_Simulation_JointMover_Proxy_DOFDesc(tmp3)));
             }
             tmp0.Add(tmp1, tmp2);
         }
     }
     target.Joints = tmp0;
     target.tick   = from.tick;
     return(target);
 }
コード例 #5
0
 public static object ProMRDS_Simulation_JointMover_Proxy_JointMoverState_TO_ProMRDS_Simulation_JointMover_JointMoverState(object transformFrom)
 {
     global::ProMRDS.Simulation.JointMover.JointMoverState       target = new global::ProMRDS.Simulation.JointMover.JointMoverState();
     global::ProMRDS.Simulation.JointMover.Proxy.JointMoverState from   = ((global::ProMRDS.Simulation.JointMover.Proxy.JointMoverState)(transformFrom));
     global::System.Collections.Generic.Dictionary <string, global:: ProMRDS.Simulation.JointMover.DOFDesc> tmp = default(global::System.Collections.Generic.Dictionary <string, global:: ProMRDS.Simulation.JointMover.DOFDesc>);
     if ((from.Joints != null))
     {
         tmp = new global::System.Collections.Generic.Dictionary <string, global:: ProMRDS.Simulation.JointMover.DOFDesc>();
         for (global::System.Collections.Generic.IEnumerator <string> iterator = from.Joints.Keys.GetEnumerator(); iterator.MoveNext();
              )
         {
             string tmp0 = default(string);
             global::ProMRDS.Simulation.JointMover.DOFDesc tmp1 = default(global::ProMRDS.Simulation.JointMover.DOFDesc);
             tmp0 = iterator.Current;
             if ((from.Joints[iterator.Current] != null))
             {
                 tmp1 = ((global::ProMRDS.Simulation.JointMover.DOFDesc)(ProMRDS_Simulation_JointMover_Proxy_DOFDesc_TO_ProMRDS_Simulation_JointMover_DOFDesc(from.Joints[iterator.Current])));
             }
             else
             {
                 tmp1 = null;
             }
             tmp.Add(tmp0, tmp1);
         }
     }
     else
     {
         tmp = null;
     }
     target.Joints = tmp;
     target.tick   = from.tick;
     return(target);
 }
コード例 #6
0
 public static object Microsoft_Robotics_Technologies_Speech_SpeechRecognizer_SpeechRecognizerState_TO_Microsoft_Robotics_Technologies_Speech_SpeechRecognizer_Proxy_SpeechRecognizerState(object transformFrom)
 {
     global::Microsoft.Robotics.Technologies.Speech.SpeechRecognizer.Proxy.SpeechRecognizerState target = new global::Microsoft.Robotics.Technologies.Speech.SpeechRecognizer.Proxy.SpeechRecognizerState();
     global::Microsoft.Robotics.Technologies.Speech.SpeechRecognizer.SpeechRecognizerState       from   = ((global::Microsoft.Robotics.Technologies.Speech.SpeechRecognizer.SpeechRecognizerState)(transformFrom));
     target.IgnoreAudioInput = from.IgnoreAudioInput;
     target.GrammarType      = ((global::Microsoft.Robotics.Technologies.Speech.SpeechRecognizer.Proxy.GrammarType)(((int)(from.GrammarType))));
     global::System.Collections.Generic.Dictionary <string, global:: System.String> tmp  = from.DictionaryGrammar;
     global::Microsoft.Dss.Core.Utilities.DssDictionary <string, string>            tmp0 = default(global::Microsoft.Dss.Core.Utilities.DssDictionary <string, string>);
     if ((tmp != null))
     {
         tmp0 = new global::Microsoft.Dss.Core.Utilities.DssDictionary <string, string>();
         for (global::System.Collections.Generic.IEnumerator <string> iterator = tmp.Keys.GetEnumerator(); iterator.MoveNext();
              )
         {
             string tmp1 = default(string);
             string tmp2 = default(string);
             tmp1 = iterator.Current;
             tmp2 = tmp[iterator.Current];
             tmp0.Add(tmp1, tmp2);
         }
     }
     target.DictionaryGrammar = tmp0;
     target.SrgsFileLocation  = from.SrgsFileLocation;
     return(target);
 }
コード例 #7
0
 public static object Microsoft_Robotics_Technologies_Speech_SpeechRecognizer_DeleteGrammarRequest_TO_Microsoft_Robotics_Technologies_Speech_SpeechRecognizer_Proxy_DeleteGrammarRequest(object transformFrom)
 {
     global::Microsoft.Robotics.Technologies.Speech.SpeechRecognizer.Proxy.DeleteGrammarRequest target = new global::Microsoft.Robotics.Technologies.Speech.SpeechRecognizer.Proxy.DeleteGrammarRequest();
     global::Microsoft.Robotics.Technologies.Speech.SpeechRecognizer.DeleteGrammarRequest       from   = ((global::Microsoft.Robotics.Technologies.Speech.SpeechRecognizer.DeleteGrammarRequest)(transformFrom));
     global::System.Collections.Generic.Dictionary <string, global:: System.String>             tmp    = from.DictionaryGrammar;
     global::Microsoft.Dss.Core.Utilities.DssDictionary <string, string> tmp0 = default(global::Microsoft.Dss.Core.Utilities.DssDictionary <string, string>);
     if ((tmp != null))
     {
         tmp0 = new global::Microsoft.Dss.Core.Utilities.DssDictionary <string, string>();
         for (global::System.Collections.Generic.IEnumerator <string> iterator = tmp.Keys.GetEnumerator(); iterator.MoveNext();
              )
         {
             string tmp1 = default(string);
             string tmp2 = default(string);
             tmp1 = iterator.Current;
             tmp2 = tmp[iterator.Current];
             tmp0.Add(tmp1, tmp2);
         }
     }
     target.DictionaryGrammar = tmp0;
     return(target);
 }
コード例 #8
0
 public static object Microsoft_Robotics_Technologies_Speech_SpeechRecognizer_Proxy_UpsertGrammarRequest_TO_Microsoft_Robotics_Technologies_Speech_SpeechRecognizer_UpsertGrammarRequest(object transformFrom)
 {
     global::Microsoft.Robotics.Technologies.Speech.SpeechRecognizer.UpsertGrammarRequest       target = new global::Microsoft.Robotics.Technologies.Speech.SpeechRecognizer.UpsertGrammarRequest();
     global::Microsoft.Robotics.Technologies.Speech.SpeechRecognizer.Proxy.UpsertGrammarRequest from   = ((global::Microsoft.Robotics.Technologies.Speech.SpeechRecognizer.Proxy.UpsertGrammarRequest)(transformFrom));
     global::System.Collections.Generic.Dictionary <string, global:: System.String>             tmp    = default(global::System.Collections.Generic.Dictionary <string, global:: System.String>);
     if ((from.DictionaryGrammar != null))
     {
         tmp = new global::System.Collections.Generic.Dictionary <string, global:: System.String>();
         for (global::System.Collections.Generic.IEnumerator <string> iterator = from.DictionaryGrammar.Keys.GetEnumerator(); iterator.MoveNext();
              )
         {
             string tmp0 = default(string);
             string tmp1 = default(string);
             tmp0 = iterator.Current;
             tmp1 = from.DictionaryGrammar[iterator.Current];
             tmp.Add(tmp0, tmp1);
         }
     }
     else
     {
         tmp = null;
     }
     target.DictionaryGrammar = tmp;
     return(target);
 }
 public static object Microsoft_Robotics_Tools_DssLogAnalyzer_Proxy_DssLogAnalyzerState_TO_Microsoft_Robotics_Tools_DssLogAnalyzer_DssLogAnalyzerState(object transformFrom)
 {
     global::Microsoft.Robotics.Tools.DssLogAnalyzer.DssLogAnalyzerState       target = new global::Microsoft.Robotics.Tools.DssLogAnalyzer.DssLogAnalyzerState();
     global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.DssLogAnalyzerState from   = ((global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.DssLogAnalyzerState)(transformFrom));
     if ((from.Envelopes != null))
     {
         int count = from.Envelopes.Count;
         global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList> tmp = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList>(count);
         for (int index = 0; (index < count); index = (index + 1))
         {
             global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList tmp0 = default(global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList);
             if ((from.Envelopes[index] != null))
             {
                 tmp0 = ((global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList)(Microsoft_Robotics_Tools_DssLogAnalyzer_Proxy_EnvelopeList_TO_Microsoft_Robotics_Tools_DssLogAnalyzer_EnvelopeList(from.Envelopes[index])));
             }
             else
             {
                 tmp0 = null;
             }
             tmp.Add(tmp0);
         }
         target.Envelopes = tmp;
     }
     else
     {
         target.Envelopes = null;
     }
     target.LogFilesFolder = from.LogFilesFolder;
     global::System.Collections.Generic.Dictionary <string, global:: System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList> > tmp1 = default(global::System.Collections.Generic.Dictionary <string, global:: System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList> >);
     if ((from.LogFileEnvelopes != null))
     {
         tmp1 = new global::System.Collections.Generic.Dictionary <string, global:: System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList> >();
         for (global::System.Collections.Generic.IEnumerator <string> iterator = from.LogFileEnvelopes.Keys.GetEnumerator(); iterator.MoveNext();
              )
         {
             string tmp2 = default(string);
             global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList> tmp3 = default(global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList>);
             tmp2 = iterator.Current;
             if ((from.LogFileEnvelopes[iterator.Current] != null))
             {
                 int count0 = from.LogFileEnvelopes[iterator.Current].Count;
                 global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList> tmp4 = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList>(count0);
                 for (int index0 = 0; (index0 < count0); index0 = (index0 + 1))
                 {
                     global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList tmp5 = default(global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList);
                     if ((from.LogFileEnvelopes[iterator.Current][index0] != null))
                     {
                         tmp5 = ((global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList)(Microsoft_Robotics_Tools_DssLogAnalyzer_Proxy_EnvelopeList_TO_Microsoft_Robotics_Tools_DssLogAnalyzer_EnvelopeList(from.LogFileEnvelopes[iterator.Current][index0])));
                     }
                     else
                     {
                         tmp5 = null;
                     }
                     tmp4.Add(tmp5);
                 }
                 tmp3 = tmp4;
             }
             else
             {
                 tmp3 = null;
             }
             tmp1.Add(tmp2, tmp3);
         }
     }
     else
     {
         tmp1 = null;
     }
     target.LogFileEnvelopes = tmp1;
     target.Headless         = from.Headless;
     if ((from.CurrentSelectedEnvelopes != null))
     {
         target.CurrentSelectedEnvelopes = ((global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList)(Microsoft_Robotics_Tools_DssLogAnalyzer_Proxy_EnvelopeList_TO_Microsoft_Robotics_Tools_DssLogAnalyzer_EnvelopeList(from.CurrentSelectedEnvelopes)));
     }
     else
     {
         target.CurrentSelectedEnvelopes = null;
     }
     return(target);
 }
 public static object Microsoft_Robotics_Tools_DssLogAnalyzer_DssLogAnalyzerState_TO_Microsoft_Robotics_Tools_DssLogAnalyzer_Proxy_DssLogAnalyzerState(object transformFrom)
 {
     global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.DssLogAnalyzerState target = new global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.DssLogAnalyzerState();
     global::Microsoft.Robotics.Tools.DssLogAnalyzer.DssLogAnalyzerState       from   = ((global::Microsoft.Robotics.Tools.DssLogAnalyzer.DssLogAnalyzerState)(transformFrom));
     global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList> tmp = from.Envelopes;
     if ((tmp != null))
     {
         int count = tmp.Count;
         global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList> tmp0 = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList>(count);
         for (int index = 0; (index < count); index = (index + 1))
         {
             global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList tmp1 = default(global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList);
             global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList       tmp2 = tmp[index];
             if ((tmp2 != null))
             {
                 tmp1 = ((global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList)(Microsoft_Robotics_Tools_DssLogAnalyzer_EnvelopeList_TO_Microsoft_Robotics_Tools_DssLogAnalyzer_Proxy_EnvelopeList(tmp2)));
             }
             tmp0.Add(tmp1);
         }
         target.Envelopes = tmp0;
     }
     target.LogFilesFolder = from.LogFilesFolder;
     global::System.Collections.Generic.Dictionary <string, global:: System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList> >           tmp3 = from.LogFileEnvelopes;
     global::Microsoft.Dss.Core.Utilities.DssDictionary <string, global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList> > tmp4 = default(global::Microsoft.Dss.Core.Utilities.DssDictionary <string, global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList> >);
     if ((tmp3 != null))
     {
         tmp4 = new global::Microsoft.Dss.Core.Utilities.DssDictionary <string, global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList> >();
         for (global::System.Collections.Generic.IEnumerator <string> iterator = tmp3.Keys.GetEnumerator(); iterator.MoveNext();
              )
         {
             string tmp5 = default(string);
             global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList> tmp6 = default(global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList>);
             tmp5 = iterator.Current;
             global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList> tmp7 = tmp3[iterator.Current];
             if ((tmp7 != null))
             {
                 int count0 = tmp7.Count;
                 global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList> tmp8 = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList>(count0);
                 for (int index0 = 0; (index0 < count0); index0 = (index0 + 1))
                 {
                     global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList tmp9  = default(global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList);
                     global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList       tmp10 = tmp7[index0];
                     if ((tmp10 != null))
                     {
                         tmp9 = ((global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList)(Microsoft_Robotics_Tools_DssLogAnalyzer_EnvelopeList_TO_Microsoft_Robotics_Tools_DssLogAnalyzer_Proxy_EnvelopeList(tmp10)));
                     }
                     tmp8.Add(tmp9);
                 }
                 tmp6 = tmp8;
             }
             tmp4.Add(tmp5, tmp6);
         }
     }
     target.LogFileEnvelopes = tmp4;
     target.Headless         = from.Headless;
     global::Microsoft.Robotics.Tools.DssLogAnalyzer.EnvelopeList tmp11 = from.CurrentSelectedEnvelopes;
     if ((tmp11 != null))
     {
         target.CurrentSelectedEnvelopes = ((global::Microsoft.Robotics.Tools.DssLogAnalyzer.Proxy.EnvelopeList)(Microsoft_Robotics_Tools_DssLogAnalyzer_EnvelopeList_TO_Microsoft_Robotics_Tools_DssLogAnalyzer_Proxy_EnvelopeList(tmp11)));
     }
     return(target);
 }