Class WebApiHelper
- Namespace
- StockSharp.Studio.WebApi
- Assembly
- StockSharp.Studio.WebApi.dll
public static class WebApiHelper
- Inheritance
-
WebApiHelper
- Inherited Members
Properties
ClientSocialsSource
StockSharp.Web.DomainModel.ClientSocial items source.
public static IList<ClientSocial> ClientSocialsSource { get; }
Property Value
- IList<ClientSocial>
CurrentDomain
Current domain id.
public static long CurrentDomain { get; }
Property Value
DefaultClientSocial
public static ClientSocial DefaultClientSocial { get; set; }
Property Value
- ClientSocial
ProductId
Current product id.
public static long ProductId { get; }
Property Value
Profile
Profile.
public static Client Profile { get; set; }
Property Value
- Client
TryClientSocialsSource
StockSharp.Web.DomainModel.ClientSocial items source.
public static IList<ClientSocial> TryClientSocialsSource { get; }
Property Value
- IList<ClientSocial>
Methods
CreateApp(long)
public static Func<App> CreateApp(long pictureId)
Parameters
pictureId
long
Returns
- Func<App>
CreateStockSharpAdapters(IdGenerator, string, SecureString)
Create adapters for StockSharp server connections.
public static IEnumerable<IMessageAdapter> CreateStockSharpAdapters(this IdGenerator transactionIdGenerator, string login, SecureString password)
Parameters
transactionIdGenerator
IdGeneratorTransaction id generator.
login
stringLogin.
password
SecureStringPassword.
Returns
- IEnumerable<IMessageAdapter>
Adapters for StockSharp server connections.
GetCurrency(ProductDomain)
public static CurrencyTypes GetCurrency(this ProductDomain domain)
Parameters
domain
ProductDomain
Returns
- CurrencyTypes
GetCurrentDomain(Product)
Get product domain info.
public static ProductDomain GetCurrentDomain(this Product product)
Parameters
product
ProductProduct.
Returns
- ProductDomain
Product domain info.
GetCurrentDomain(ProductGroup)
Get product group domain info.
public static ProductGroupDomain GetCurrentDomain(this ProductGroup group)
Parameters
group
ProductGroupProduct group.
Returns
- ProductGroupDomain
Product group domain info.
GetName(Product)
Get product's name.
public static string GetName(this Product product)
Parameters
product
ProductProduct.
Returns
- string
Name.
GetName(ProductGroup)
Get group's name.
public static string GetName(this ProductGroup group)
Parameters
group
ProductGroupProduct group.
Returns
- string
Name.
GetSystemInfo()
public static string GetSystemInfo()
Returns
GetUrlAbsolute(Product)
public static string GetUrlAbsolute(this Product product)
Parameters
product
Product
Returns
GetUrlRelative(Product)
public static string GetUrlRelative(this Product product)
Parameters
product
Product
Returns
InitAdapter(IMessageAdapter, string, string, string, SecureString)
Create community adapter.
public static IMessageAdapter InitAdapter(this IMessageAdapter adapter, string address, string name, string login, SecureString password)
Parameters
adapter
IMessageAdapterAdapter.
address
stringAddress.
name
stringServer name.
login
stringLogin.
password
SecureStringPassword.
Returns
- IMessageAdapter
Adapter.
InitServices(Func<IWebSocketService, CancellationToken, ValueTask>, CancellationToken)
public static Task InitServices(Func<IWebSocketService, CancellationToken, ValueTask> socketConnected, CancellationToken token)
Parameters
socketConnected
Func<IWebSocketService, CancellationToken, ValueTask>token
CancellationToken
Returns
IsAvailable(Product)
public static bool IsAvailable(this Product product)
Parameters
product
Product
Returns
PrepareLogsFile(TimeSpan, Action<Exception>)
public static string PrepareLogsFile(this TimeSpan duration, Action<Exception> errorHandler)
Parameters
Returns
RefreshAsync(IClientSocialService, CancellationToken)
public static Task RefreshAsync(this IClientSocialService svc, CancellationToken cancellationToken = default)
Parameters
svc
IClientSocialServicecancellationToken
CancellationToken
Returns
RegisterWebApiServices(Type, bool?)
public static void RegisterWebApiServices(this Type owner, bool? onlineMode = null)
Parameters
ToContentType(string)
Convert file extension to StockSharp.Web.DomainModel.ProductContentTypes2.
public static ProductContentTypes2 ToContentType(this string extension)
Parameters
extension
stringFile extension.
Returns
- ProductContentTypes2
StockSharp.Web.DomainModel.ProductContentTypes2
ToExtension(ProductContentTypes2)
Convert StockSharp.Web.DomainModel.ProductContentTypes2 to file extension.
public static string ToExtension(this ProductContentTypes2 contentType)
Parameters
contentType
ProductContentTypes2
Returns
- string
File extension.
TrySendBugReport(LogMessage)
public static ProductBugReport TrySendBugReport(this LogMessage log)
Parameters
log
LogMessage
Returns
- ProductBugReport
Events
ProfileChanged
Profile changed event.
public static event Action ProfileChanged