Class BaseResource
Базовый класс для представления ресурса.
Inheritance
System.Object
BaseResource
Implements
System.Xml.Serialization.IXmlSerializable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Terrasoft.Common.dll
Syntax
public abstract class BaseResource : IXmlSerializable, IMetaDataSerializable
Fields
FileExtensionAttribute
Declaration
protected const string FileExtensionAttribute = "FileExtension"
Field Value
Type |
Description |
System.String |
|
FilePathAttribute
Declaration
protected const string FilePathAttribute = "FilePath"
Field Value
Type |
Description |
System.String |
|
GroupAttribute
Declaration
protected const string GroupAttribute = "Group"
Field Value
Type |
Description |
System.String |
|
GroupsElement
Declaration
protected const string GroupsElement = "Groups"
Field Value
Type |
Description |
System.String |
|
IdAttribute
Declaration
protected const string IdAttribute = "Id"
Field Value
Type |
Description |
System.String |
|
ImageContentTypeAttribute
Declaration
protected const string ImageContentTypeAttribute = "ContentType"
Field Value
Type |
Description |
System.String |
|
ItemsElement
Declaration
protected const string ItemsElement = "Items"
Field Value
Type |
Description |
System.String |
|
NameAttribute
Declaration
protected const string NameAttribute = "Name"
Field Value
Type |
Description |
System.String |
|
ResourceItemSeparator
Declaration
protected const string ResourceItemSeparator = "."
Field Value
Type |
Description |
System.String |
|
ResourcesElement
Declaration
protected const string ResourcesElement = "Resources"
Field Value
Type |
Description |
System.String |
|
TypeAttribute
Declaration
protected const string TypeAttribute = "Type"
Field Value
Type |
Description |
System.String |
|
ValueAttribute
Declaration
protected const string ValueAttribute = "Value"
Field Value
Type |
Description |
System.String |
|
Properties
ActualFilePath
Актуальный путь к файлу ресурса. Если для текущего ресурса не определен путь к файлу, то возвращается
путь к файлу родительской группы ресурса
Declaration
public string ActualFilePath { get; protected set; }
Property Value
Type |
Description |
System.String |
|
ActualItemType
Актуальный тип ресурса. Если для текущего ресурса не определен его тип, то возвращается тип родительской
группы ресурса.
Declaration
public ResourceItemType ActualItemType { get; }
Property Value
ActualName
Актуальное имя ресурса в формате
[Имя родительской группы_1].<...>.[Имя родительской группы_N].[Имя ресурса]
Declaration
public string ActualName { get; }
Property Value
Type |
Description |
System.String |
|
ContentType
Declaration
public TerrasoftImageContentType ContentType { get; set; }
Property Value
FileExtension
Declaration
public string FileExtension { get; set; }
Property Value
Type |
Description |
System.String |
|
FilePath
Declaration
public string FilePath { get; set; }
Property Value
Type |
Description |
System.String |
|
ItemType
Declaration
public ResourceItemType ItemType { get; set; }
Property Value
Name
Declaration
public string Name { get; set; }
Property Value
Type |
Description |
System.String |
|
ParentGroup
Родительская группа ресурсов.
Declaration
public ResourceGroup ParentGroup { get; }
Property Value
Methods
GetSchema()
Возвращает Xml-схему представления ресурса.
Declaration
public virtual XmlSchema GetSchema()
Returns
Type |
Description |
System.Xml.Schema.XmlSchema |
Xml-схема представления ресурса.
|
Абстрактный метод десериализации ресурсов с помощью заданного экземпляра
DataReader.
Declaration
public abstract void ReadMetaData(DataReader reader)
Parameters
Type |
Name |
Description |
DataReader |
reader |
Экземпляр DataReader, с помощью которого осуществляется десериализация.
|
ReadXml(XmlReader)
Абстрактный метод десериализации ресурсов с помощью заданного экземпляра System.Xml.XmlReader.
Declaration
public abstract void ReadXml(XmlReader reader)
Parameters
Type |
Name |
Description |
System.Xml.XmlReader |
reader |
Экземпляр System.Xml.XmlReader, с помощью которого осуществляется десериализация.
|
Абстрактный метод сериализации ресурсов с помощью заданного экземпляра
DataWriter.
Declaration
public abstract void WriteMetaData(DataWriter writer)
Parameters
WriteXml(XmlWriter)
Абстрактный метод сериализации ресурсов с помощью заданного экземпляра System.Xml.XmlWriter.
Declaration
public abstract void WriteXml(XmlWriter writer)
Parameters
Type |
Name |
Description |
System.Xml.XmlWriter |
writer |
Экземпляр System.Xml.XmlWriter, с помощью которого осуществляется сериализация.
|
Implements
System.Xml.Serialization.IXmlSerializable
Extension Methods