Beispiel #1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="JsonBuild" /> class.
 /// </summary>
 /// <param name="token">The token.</param>
 private JsonBuild(JToken token) : base(token)
 {
     r_DefinitionProvider = new Lazy <JsonBuildDefinition>(() =>
     {
         var src        = sr_Definition.Eval(this);
         var definition = JsonBuildDefinition.FromToken(src);
         return(definition);
     });
     r_DropProvider = new Lazy <JsonBuildDrop>(() =>
     {
         var src  = sr_Drop.Eval(this);
         var drop = JsonBuildDrop.FromToken(src);
         return(drop);
     });
     r_QueueProvider = new Lazy <JsonBuildQueue>(() =>
     {
         var src   = sr_Queue.Eval(this);
         var queue = JsonBuildQueue.FromToken(src);
         return(queue);
     });
     r_LastChangedByProvider = new Lazy <JsonIdentity>(() =>
     {
         var src      = sr_LastChangedBy.Eval(this);
         var identity = JsonIdentity.FromToken(src);
         return(identity);
     });
 }
Beispiel #2
0
        /// <summary>
        ///     Froms the token.
        /// </summary>
        /// <param name="token">The token.</param>
        /// <returns>JsonBuildDefinition.</returns>
        public static JsonBuildDrop FromToken(JToken token)
        {
            var instance = new JsonBuildDrop(token);

            return(instance);
        }