コード例 #1
0
 public static TomlFloat CreateAttached(this TomlObject rootSource, double value)
 => new TomlFloat(rootSource.Root, value);
コード例 #2
0
 public static TomlDuration CreateAttached(this TomlObject rootSource, TimeSpan value)
 => new TomlDuration(rootSource.Root, value);
コード例 #3
0
 public static TomlString CreateAttached(this TomlObject rootSource, string value)
 => new TomlString(rootSource.Root, value);
コード例 #4
0
 public static TomlInt CreateAttached(this TomlObject rootSource, long value)
 => new TomlInt(rootSource.Root, value);
コード例 #5
0
 public static TomlArray CreateAttachedArray(this TomlObject rootSource, IEnumerable <string> values)
 => new TomlArray(rootSource.Root, values.Select(v => new TomlString(rootSource.Root, v)).ToArray());
コード例 #6
0
 // Values
 public static TomlBool CreateAttached(this TomlObject rootSource, bool value)
 => new TomlBool(rootSource.Root, value);
コード例 #7
0
 // Empty Structures
 public static TomlArray CreateEmptyAttachedArray(this TomlObject rootSource)
 => CreateAttached(rootSource, new bool[] { });
コード例 #8
0
 public static TomlArray CreateAttached(this TomlObject rootSource, IEnumerable <TimeSpan> values)
 => new TomlArray(rootSource.Root, values.Select(v => new TomlDuration(rootSource.Root, v)).ToArray());
コード例 #9
0
 internal ITomlConverter TryGetConverter(TomlObject tomlObj, Type to)
 => this.TryGetConverter(tomlObj.GetType(), to);
コード例 #10
0
ファイル: TomlObject.cs プロジェクト: zanedp/Nett
 protected static T CopyComments <T>(T dst, TomlObject src)
     where T : TomlObject
 {
     dst.comments.AddRange(src.comments);
     return(dst);
 }
コード例 #11
0
 internal void OnTargetPropertyNotFound(string[] keyChain, object target, TomlObject value)
 => this.whenTargetPropertyNotFoundCallback(keyChain, target, value);
コード例 #12
0
 public static TomlArray CreateAttachedArray(this TomlObject rootSource)
 => new TomlArray(rootSource.Root);
コード例 #13
0
 public static TomlTable CreateAttachedTable(
     this TomlObject rootSource, TomlTable.TableTypes type = TomlTable.TableTypes.Default)
 => new TomlTable(rootSource.Root, type);
コード例 #14
0
 public static TomlDateTime CreateAttached(this TomlObject rootSource, DateTimeOffset value)
 => new TomlDateTime(rootSource.Root, value);
コード例 #15
0
 public static TomlTableArray CreateEmptyAttachedTableArray(this TomlObject rootSource)
 => CreateAttached(rootSource, new object[] { });
コード例 #16
0
 public static TomlArray CreateAttached(this TomlObject rootSource, IEnumerable <float> values)
 => new TomlArray(rootSource.Root, values.Select(v => new TomlFloat(rootSource.Root, v)).ToArray());
コード例 #17
0
 public static TomlTable CreateEmptyAttachedTable(
     this TomlObject rootSource, TomlTable.TableTypes type = TomlTable.TableTypes.Default)
 => CreateAttached(rootSource, new object());
コード例 #18
0
 public static TomlArray CreateAttached(this TomlObject rootSource, IEnumerable <DateTimeOffset> values)
 => new TomlArray(rootSource.Root, values.Select(v => new TomlDateTime(rootSource.Root, v)).ToArray());
コード例 #19
0
 public static TomlTableArray CreateAttachedTableArray(this TomlObject rootSource, IEnumerable <TomlTable> tables)
 => new TomlTableArray(rootSource.Root, tables);