LiquidTechnologies.XmlObjects Namespace / LxSerializer Class / LxSerializer Constructor / LxSerializer Constructor(Predicate<Type>,Assembly[])
Makes it possible to select which classes are registered with the serializer (the function should return true to register the class).
An optional list of assemblies to scan for Liquid XML Objects serialization classes.
If no assemblies are provided then ALL assemblies are scanned.
Example

In This Topic
    LxSerializer Constructor(Predicate<Type>,Assembly[])
    In This Topic
    Constructs an LxSerializer, required for serializing and de-serializing Liquid XML Objects attributed classes.
    Syntax
    'Declaration
     
    
    Public Function New( _
       ByVal classRegistrationFilter As System.Predicate(Of Type), _
       ByVal ParamArray assembliesToScan() As System.Reflection.Assembly _
    )
    public LxSerializer( 
       System.Predicate<Type> classRegistrationFilter,
       params System.Reflection.Assembly[] assembliesToScan
    )

    Parameters

    classRegistrationFilter
    Makes it possible to select which classes are registered with the serializer (the function should return true to register the class).
    assembliesToScan
    An optional list of assemblies to scan for Liquid XML Objects serialization classes.
    If no assemblies are provided then ALL assemblies are scanned.
    Remarks
    Additional assemblies can be added to the scan list later using the RegisterAssembly method.
    Example
    var companySerializer = new LxSerializer(type => type.Namespace.StartsWith("MyProject.MyCompanyXSD."));
    var companyEmployeeSerializer = new LxSerializer<MyProject.MyCompanyXSD.EmployeeElm>(companySerializer);
    var companyEmployee = companyEmployeeSerializer.Deserialize(@"C:\CompanyEmployee.xml");
    Requirements

    Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows Server 2016, Windows Server 2012, Windows Server 2008. Please ensure you have the latest Service Pack for your operating system installed.

    See Also