Try our conversational search powered by Generative AI!

Class StaticFragment

Represents a static string in content

Inheritance
System.Object
StaticFragment
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()
Namespace: EPiServer.Core.Html.StringParsing
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
public class StaticFragment : IStringFragment, IReferenceMap

Constructors

StaticFragment(String)

Initializes a new instance of the StaticFragment class.

Declaration
public StaticFragment(string str)
Parameters
Type Name Description
System.String str

The static string

Properties

InternalFormat

Gets the internal format of the fragment

Declaration
public string InternalFormat { get; }
Property Value
Type Description
System.String

The internal format.

Remarks

For static fragment the output is same for all formats.

ReferencedPermanentLinkIds

Gets an System.Collections.Generic.IList<T> of permanent link ids that are referenced from this string fragment.

Declaration
public IList<Guid> ReferencedPermanentLinkIds { get; }
Property Value
Type Description
System.Collections.Generic.IList<System.Guid>

An System.Collections.Generic.IList<T> of permanent link ids that are referenced from this fragment.

Remarks

Static fragments will treat all content as static with meaning no references are transfered.

Methods

GetEditFormat()

Gets the format for edit mode

Declaration
public string GetEditFormat()
Returns
Type Description
System.String
Remarks

For static fragment the output is same for all formats.

GetViewFormat()

Gets the format for view mode

Declaration
public string GetViewFormat()
Returns
Type Description
System.String
Remarks

For static fragment the output is same for all formats.

RemapPermanentLinkReferences(IDictionary<Guid, Guid>)

Remaps permanent links according to the provided link mapping.

Declaration
public void RemapPermanentLinkReferences(IDictionary<Guid, Guid> idMap)
Parameters
Type Name Description
System.Collections.Generic.IDictionary<System.Guid, System.Guid> idMap

The link mapping.

Remarks

Static fragment does not transfer any references.

WriteTo(TextWriter)

Write static text to writer

Declaration
public void WriteTo(TextWriter writer)
Parameters
Type Name Description
System.IO.TextWriter writer

The output

Remarks

This method allows streaming of big segments of static text

Implements

Extension Methods