Class File
Defines a File element, to describe a file that will be provisioned into the target Site
Inherited Members
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 |