Class CustomImplementationFactory
Namespace: Aspose.Cells
Assembly: Aspose.Cells.dll (25.2.0)
Factory to create some instances which may be re-implemented by user for special purpose.
public class CustomImplementationFactory
Inheritance
object ← CustomImplementationFactory
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
CustomImplementationFactory()
public CustomImplementationFactory()
Methods
CreateCultureInfo(int)
Create one CultureInfo by given id.
public virtual CultureInfo CreateCultureInfo(int lcid)
Parameters
lcid
int
Returns
The CultureInfo instance.
Remarks
This implementation is useful for situations: 1. Some cultures may not be supported by user’s environment and creating the required CultureInfo with given identifier may cause Exception. To avoid the exception, user may override this method to provide a valid CultureInfo instance for the unsupported one. 2. User may want to specify some custom properties for some cultures to get expected result for formatting. For this purpose user may override this method to provide the CultureInfo instance with user specified properties. Please note UseUserOverride property of the returned CultureInfo instance may influence the formatted result. If it is false, some properties of the returned CultureInfo instance may be overridden by our built-in formatting engine according to the formatting requirements of different scenarios. If it is true, we will not change any properties of it and use it to format values directly. So, if user has specified custom properties for the returned CultureInfo instance, please make sure its UseUserOverride is true.
CreateMemoryStream()
Create one instance of MemoryStream or custom implementation of MemoryStream.
public virtual MemoryStream CreateMemoryStream()
Returns
The MemoryStream instance.
CreateMemoryStream(int)
Create one instance of MemoryStream or custom implementation of MemoryStream.
public virtual MemoryStream CreateMemoryStream(int capacity)
Parameters
capacity
int
Initial capacity for the MemoryStream
Returns
The MemoryStream instance.
CreateRandomInstance()
Create one instance of random number generator.
public virtual Random CreateRandomInstance()
Returns
instance of random number generator