public virtual void Copy(GetOptions other) { this.Type = other.Type; //when copying options for properties we change the lazy so self and referenced if //lazy loading isn't disabled this.Lazy = other.Lazy == LazyLoading.OnlyReferenced ? LazyLoading.Enabled : other.Lazy; this.InferType = other.InferType; this.Cache = other.Cache; }
/// <summary> /// Checks to see if lazy loading has been enabled for the object construction. /// </summary> /// <param name="options">The options being used to build the model.</param> /// <returns></returns> public virtual bool IsEnabled(GetOptions options) { return(options.Lazy == LazyLoading.Enabled); }