Пример #1
0
                public void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services)
                {
                    switch (_typeCode)
                    {
                    case TypeCode.SByte:
                        sw.Append("(SByte)");
                        break;

                    case TypeCode.Byte:
                        sw.Append("(Byte)");
                        break;

                    case TypeCode.Int16:
                        sw.Append("(Int16)");
                        break;

                    case TypeCode.UInt16:
                        sw.Append("(UInt16)");
                        break;
                    }

                    sw.Append(Value.ToString(CultureInfo.InvariantCulture));

                    if (_typeCode == TypeCode.UInt32)
                    {
                        sw.Append("u");
                    }
                }
Пример #2
0
 public void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services)
 {
     sw.Append($"R{_index.ResultId}");
 }
Пример #3
0
 public void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services)
 {
     sw.Append(Value.ToString(CultureInfo.InvariantCulture));
 }
Пример #4
0
                public void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services)
                {
                    var name = formatterContext.GetObjectNameByIndex(_fieldObjectId.Value);

                    sw.Append($"typeof({name})");
                }
Пример #5
0
 public void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services)
 {
     sw.Append("!");
     _value.Format(sw, formatterContext, services);
 }