Search Results for

    Show / Hide Table of Contents

    Class File

    Defines a File element, to describe a file that will be provisioned into the target Site

    Inheritance
    System.Object
    BaseModel
    File
    Inherited Members
    BaseModel.ParentTemplate
    Namespace: PnP.Framework.Provisioning.Model
    Assembly: PnP.Framework.dll
    Syntax
    public class File : BaseModel, IProvisioningTemplateDescendant

    Constructors

    File()

    Constructor for the File class

    Declaration
    public File()

    File(String, String, Boolean, IEnumerable<WebPart>, IDictionary<String, String>, ObjectSecurity, FileLevel)

    Constructor for the File class

    Declaration
    public File(string src, string folder, bool overwrite, IEnumerable<WebPart> webParts, IDictionary<string, string> properties, ObjectSecurity security = null, FileLevel level = FileLevel.Draft)
    Parameters
    System.String src

    Source name of the file

    System.String folder

    Targer Folder of the file

    System.Boolean overwrite

    Overwrite flag of the file

    IEnumerable<WebPart> webParts

    Webparts in the file

    IDictionary<System.String, System.String> properties

    Properties of the file

    ObjectSecurity security

    Security Rules of the file

    FileLevel level

    Level status for the file

    Properties

    Folder

    The TargetFolder of the File

    Declaration
    public string Folder { get; set; }
    Property Value
    System.String

    Level

    The Level status for the File

    Declaration
    public FileLevel Level { get; set; }
    Property Value
    FileLevel

    Overwrite

    The Overwrite flag for the File

    Declaration
    public bool Overwrite { get; set; }
    Property Value
    System.Boolean

    Properties

    Properties of the file

    Declaration
    public Dictionary<string, string> Properties { get; }
    Property Value
    Dictionary<System.String, System.String>

    Security

    Defines the Security rules for the File

    Declaration
    public ObjectSecurity Security { get; set; }
    Property Value
    ObjectSecurity

    Src

    The Src of the File

    Declaration
    public string Src { get; set; }
    Property Value
    System.String

    TargetFileName

    The Target file name for the File, optional attribute. If missing, the original file name will be used.

    Declaration
    public String TargetFileName { get; set; }
    Property Value
    String

    WebParts

    Webparts in the file

    Declaration
    public WebPartCollection WebParts { get; }
    Property Value
    WebPartCollection

    Methods

    Equals(File)

    Compares File object based on Folder, Overwrite, Src, WebParts, Properties, Security, and TargetFileName.

    Declaration
    public bool Equals(File other)
    Parameters
    File other

    File object

    Returns
    System.Boolean

    true if the File object is equal to the current object; otherwise, false.

    Equals(Object)

    Compares object with File

    Declaration
    public override bool Equals(object obj)
    Parameters
    System.Object obj

    Object that represents File

    Returns
    System.Boolean

    true if the current object is equal to the File

    GetHashCode()

    Gets the hash code

    Declaration
    public override int GetHashCode()
    Returns
    System.Int32

    Returns HashCode

    Extension Methods

    ValidationExtensions.ValidateNotNullOrEmpty<T>(T, String)
    ObjectExtensions.Set<TObject, T>(TObject, Expression<Func<TObject, T>>, T, Boolean, Boolean)
    ObjectExtensions.GetPublicInstancePropertyValue(Object, String)
    ObjectExtensions.GetPublicInstanceProperty(Object, String)
    ObjectExtensions.SetPublicInstancePropertyValue(Object, String, Object)
    Extensions.ToByteArray(Object)
    Back to top PnP Framework
    Generated by DocFX with Material UI
    spacer