Search Results for

    Show / Hide Table of Contents

    Class SettingsGuard

    Guards settings from being changed.

    Inheritance
    Object
    SettingsGuard
    Implements
    ICustomSerializable
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Microsoft.ML.Probabilistic.Learners
    Assembly: Microsoft.ML.Probabilistic.Learners.dll
    Syntax
    [Serializable]
    public class SettingsGuard : ICustomSerializable

    Constructors

    SettingsGuard(IReader, Func<Boolean>)

    Initializes a new instance of the SettingsGuard class from a reader of a binary stream.

    Declaration
    public SettingsGuard(IReader reader, Func<bool> isImmutable)
    Parameters
    Type Name Description
    IReader reader

    The reader to load the SettingsGuard from.

    Func<Boolean> isImmutable

    If true, the setting cannot be changed.

    SettingsGuard(Func<Boolean>, String)

    Initializes a new instance of the SettingsGuard class.

    Declaration
    public SettingsGuard(Func<bool> isImmutable, string message = "This setting cannot be changed.")
    Parameters
    Type Name Description
    Func<Boolean> isImmutable

    If true, the setting cannot be changed.

    String message

    The message shown when trying to change an immutable setting.

    Methods

    OnSettingChanging()

    Performs actions required before the value of a training setting is about to be changed.

    Declaration
    public void OnSettingChanging()

    SaveForwardCompatible(IWriter)

    Saves the state of the SettingsGuard using the specified writer to a binary stream.

    Declaration
    public void SaveForwardCompatible(IWriter writer)
    Parameters
    Type Name Description
    IWriter writer

    The writer to save the state of the SettingsGuard to.

    Implements

    ICustomSerializable

    Extension Methods

    Utilities.SaveForwardCompatible(ICustomSerializable, String, FileMode)
    Utilities.SaveForwardCompatibleAsBinary(ICustomSerializable, Stream)
    Utilities.SaveForwardCompatibleAsText(ICustomSerializable, Stream)
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.