/// <summary> /// Creates a copy of the <see cref="NapConfig"/> configuration. /// </summary> /// <returns>A copy of the current instance.</returns> public INapConfig Clone() { var clone = new NapConfig { Serializers = new SerializersConfig(Serializers), BaseUrl = BaseUrl, FillMetadata = FillMetadata, Serialization = Serialization, Advanced = Advanced.Clone(), Headers = new Headers(Headers), QueryParameters = new QueryParameters(QueryParameters), Profiles = new Profiles(Profiles) }; return(clone); }
/// <summary> /// Setup a <see cref="NapClient"/> for initial use using a *.config file. /// Overwrites the <paramref name="config"/>, so this should be first in plugin order. /// </summary> /// <param name="config">Disposed, ignored configuration.</param> /// <returns>A new configuration that has been loaded using the *.config file.</returns> public override INapConfig Configure(INapConfig config) { return(NapConfig.GetCurrent()); }