本文整理汇总了C#中IAvatarService类的典型用法代码示例。如果您正苦于以下问题:C# IAvatarService类的具体用法?C# IAvatarService怎么用?C# IAvatarService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IAvatarService类属于命名空间,在下文中一共展示了IAvatarService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AvatarServerPostHandler
public AvatarServerPostHandler(string url, IAvatarService service, string SessionID, IRegistryCore registry) :
base("POST", url)
{
m_AvatarService = service;
m_SessionID = SessionID;
m_registry = registry;
}
示例2: HomeViewModel
public HomeViewModel()
{
this.loader = ServiceLocator.Current.GetInstance<IDataLoader>();
this.avatarService = ServiceLocator.Current.GetInstance<IAvatarService>();
this.readLaterManager = ServiceLocator.Current.GetInstance<IReadLaterManager>();
Recommendations = new BindableCollection<RecommendationViewModel>();
}
示例3: UserAccountService
public UserAccountService(IConfigSource config)
: base(config)
{
IConfig userConfig = config.Configs["UserAccountService"];
if (userConfig == null)
throw new Exception("No UserAccountService configuration");
string gridServiceDll = userConfig.GetString("GridService", string.Empty);
if (gridServiceDll != string.Empty)
m_GridService = LoadPlugin<IGridService>(gridServiceDll, new Object[] { config });
string authServiceDll = userConfig.GetString("AuthenticationService", string.Empty);
if (authServiceDll != string.Empty)
m_AuthenticationService = LoadPlugin<IAuthenticationService>(authServiceDll, new Object[] { config });
string presenceServiceDll = userConfig.GetString("GridUserService", string.Empty);
if (presenceServiceDll != string.Empty)
m_GridUserService = LoadPlugin<IGridUserService>(presenceServiceDll, new Object[] { config });
string invServiceDll = userConfig.GetString("InventoryService", string.Empty);
if (invServiceDll != string.Empty)
m_InventoryService = LoadPlugin<IInventoryService>(invServiceDll, new Object[] { config });
string avatarServiceDll = userConfig.GetString("AvatarService", string.Empty);
if (avatarServiceDll != string.Empty)
m_AvatarService = LoadPlugin<IAvatarService>(avatarServiceDll, new Object[] { config });
m_CreateDefaultAvatarEntries = userConfig.GetBoolean("CreateDefaultAvatarEntries", false);
// In case there are several instances of this class in the same process,
// the console commands are only registered for the root instance
if (m_RootInstance == null && MainConsole.Instance != null)
{
m_RootInstance = this;
MainConsole.Instance.Commands.AddCommand("Users", false,
"create user",
"create user [<first> [<last> [<pass> [<email> [<user id>]]]]]",
"Create a new user", HandleCreateUser);
MainConsole.Instance.Commands.AddCommand("Users", false,
"reset user password",
"reset user password [<first> [<last> [<password>]]]",
"Reset a user password", HandleResetUserPassword);
MainConsole.Instance.Commands.AddCommand("Users", false,
"set user level",
"set user level [<first> [<last> [<level>]]]",
"Set user level. If >= 200 and 'allow_grid_gods = true' in OpenSim.ini, "
+ "this account will be treated as god-moded. "
+ "It will also affect the 'login level' command. ",
HandleSetUserLevel);
MainConsole.Instance.Commands.AddCommand("Users", false,
"show account",
"show account <first> <last>",
"Show account details for the given user", HandleShowAccount);
}
}
示例4: PostStart
public void PostStart(IConfigSource config, IRegistryCore registry)
{
IConfig handlerConfig = config.Configs["Handlers"];
if (handlerConfig.GetString("AvatarInHandler", "") != Name)
return;
IHttpServer server = registry.RequestModuleInterface<ISimulationBase>().GetHttpServer((uint)handlerConfig.GetInt("AvatarInHandlerPort"));
m_AvatarService = registry.RequestModuleInterface<IAvatarService>();
server.AddStreamHandler(new AvatarServerPostHandler(m_AvatarService));
}
示例5: ManageController
public ManageController(ApplicationUserManager userManager,
ApplicationSignInManager signInManager,
IAuthenticationManager authenticationManager,
IUserContext userContext,
IMembershipService membershipService,
IAvatarService avatarService)
{
_userManager = userManager;
_signInManager = signInManager;
_authenticationManager = authenticationManager;
_userContext = userContext;
_membershipService = membershipService;
_avatarService = avatarService;
}
示例6: Start
public void Start (IConfigSource config, IRegistryCore registry)
{
if (!m_enabled)
return;
m_assetService = registry.RequestModuleInterface<IAssetService> ();
m_inventoryService = registry.RequestModuleInterface<IInventoryService> ();
m_avatarService = registry.RequestModuleInterface<IAvatarService> ();
m_assetService = registry.RequestModuleInterface<IAssetService> ();
MainConsole.Instance.Commands.AddCommand (
"bake avatar",
"bake avatar [firstname lastname]",
"Bakes an avatar's appearance",
HandleBakeAvatar, false, true);
}
示例7: ManageController
public ManageController(
UserManager<User> userManager,
SignInManager<User> signInManager,
IEmailSender emailSender,
ISmsSender smsSender,
ILoggerFactory loggerFactory,
IAvatarService avatarService,
IMembershipService membershipService)
{
_userManager = userManager;
_signInManager = signInManager;
_emailSender = emailSender;
_smsSender = smsSender;
_logger = loggerFactory.CreateLogger<ManageController>();
_avatarService = avatarService;
_membershipService = membershipService;
}
示例8: AvatarServiceConnector
public AvatarServiceConnector(IConfigSource config, IHttpServer server, string configName) :
base(config, server, configName)
{
IConfig serverConfig = config.Configs[m_ConfigName];
if (serverConfig == null)
throw new Exception(String.Format("No section {0} in config file", m_ConfigName));
string avatarService = serverConfig.GetString("LocalServiceModule",
String.Empty);
if (avatarService == String.Empty)
throw new Exception("No LocalServiceModule in config file");
Object[] args = new Object[] { config };
m_AvatarService = ServerUtils.LoadPlugin<IAvatarService>(avatarService, args);
server.AddStreamHandler(new AvatarServerPostHandler(m_AvatarService));
}
示例9: AvatarServerPostHandler
public AvatarServerPostHandler(IAvatarService service) :
base("POST", "/avatar")
{
m_AvatarService = service;
}
示例10: HGSuitcaseInventoryService
public HGSuitcaseInventoryService(IConfigSource config, string configName)
: base(config, configName)
{
m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Starting with config name {0}", configName);
if (configName != string.Empty)
m_ConfigName = configName;
if (m_Database == null)
m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: m_Database is null!");
//
// Try reading the [InventoryService] section, if it exists
//
IConfig invConfig = config.Configs[m_ConfigName];
if (invConfig != null)
{
string userAccountsDll = invConfig.GetString("UserAccountsService", string.Empty);
if (userAccountsDll == string.Empty)
throw new Exception("Please specify UserAccountsService in HGInventoryService configuration");
Object[] args = new Object[] { config };
m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(userAccountsDll, args);
if (m_UserAccountService == null)
throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll));
string avatarDll = invConfig.GetString("AvatarService", string.Empty);
if (avatarDll == string.Empty)
throw new Exception("Please specify AvatarService in HGInventoryService configuration");
m_AvatarService = ServerUtils.LoadPlugin<IAvatarService>(avatarDll, args);
if (m_AvatarService == null)
throw new Exception(String.Format("Unable to create m_AvatarService from {0}", avatarDll));
// Preferred
m_HomeURL = invConfig.GetString("HomeURI", m_HomeURL);
// m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);
}
m_log.Debug("[HG SUITCASE INVENTORY SERVICE]: Starting...");
}
示例11: IncomingCapsRequest
public void IncomingCapsRequest(UUID agentID, GridRegion region, ISimulationBase simbase, ref OSDMap capURLs)
{
m_syncMessage = simbase.ApplicationRegistry.RequestModuleInterface<ISyncMessagePosterService>();
m_inventoryService = simbase.ApplicationRegistry.RequestModuleInterface<IInventoryService>();
m_avatarService = simbase.ApplicationRegistry.RequestModuleInterface<IAvatarService>();
m_assetService = simbase.ApplicationRegistry.RequestModuleInterface<IAssetService>();
m_region = region;
m_agentID = agentID;
m_uri = "/CAPS/UpdateAvatarAppearance/" + UUID.Random() + "/";
MainServer.Instance.AddStreamHandler(new GenericStreamHandler("POST",
m_uri,
UpdateAvatarAppearance));
capURLs["UpdateAvatarAppearance"] = MainServer.Instance.ServerURI + m_uri;
}
示例12: LLLoginService
public LLLoginService(IConfigSource config, ISimulationService simService, ILibraryService libraryService)
{
m_LoginServerConfig = config.Configs["LoginService"];
if (m_LoginServerConfig == null)
throw new Exception(String.Format("No section LoginService in config file"));
string accountService = m_LoginServerConfig.GetString("UserAccountService", String.Empty);
string gridUserService = m_LoginServerConfig.GetString("GridUserService", String.Empty);
string agentService = m_LoginServerConfig.GetString("UserAgentService", String.Empty);
string authService = m_LoginServerConfig.GetString("AuthenticationService", String.Empty);
string invService = m_LoginServerConfig.GetString("InventoryService", String.Empty);
string gridService = m_LoginServerConfig.GetString("GridService", String.Empty);
string presenceService = m_LoginServerConfig.GetString("PresenceService", String.Empty);
string libService = m_LoginServerConfig.GetString("LibraryService", String.Empty);
string friendsService = m_LoginServerConfig.GetString("FriendsService", String.Empty);
string avatarService = m_LoginServerConfig.GetString("AvatarService", String.Empty);
string simulationService = m_LoginServerConfig.GetString("SimulationService", String.Empty);
m_DefaultRegionName = m_LoginServerConfig.GetString("DefaultRegion", String.Empty);
m_WelcomeMessage = m_LoginServerConfig.GetString("WelcomeMessage", "Welcome to OpenSim!");
m_RequireInventory = m_LoginServerConfig.GetBoolean("RequireInventory", true);
m_AllowRemoteSetLoginLevel = m_LoginServerConfig.GetBoolean("AllowRemoteSetLoginLevel", false);
m_MinLoginLevel = m_LoginServerConfig.GetInt("MinLoginLevel", 0);
m_GatekeeperURL = m_LoginServerConfig.GetString("GatekeeperURI", string.Empty);
m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty);
m_SearchURL = m_LoginServerConfig.GetString("SearchURL", string.Empty);
m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty);
m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty);
// These are required; the others aren't
if (accountService == string.Empty || authService == string.Empty)
throw new Exception("LoginService is missing service specifications");
Object[] args = new Object[] { config };
m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args);
m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args);
m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, args);
m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args);
if (gridService != string.Empty)
m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
if (presenceService != string.Empty)
m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
if (avatarService != string.Empty)
m_AvatarService = ServerUtils.LoadPlugin<IAvatarService>(avatarService, args);
if (friendsService != string.Empty)
m_FriendsService = ServerUtils.LoadPlugin<IFriendsService>(friendsService, args);
if (simulationService != string.Empty)
m_RemoteSimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args);
if (agentService != string.Empty)
m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(agentService, args);
//
// deal with the services given as argument
//
m_LocalSimulationService = simService;
if (libraryService != null)
{
m_log.DebugFormat("[LLOGIN SERVICE]: Using LibraryService given as argument");
m_LibraryService = libraryService;
}
else if (libService != string.Empty)
{
m_log.DebugFormat("[LLOGIN SERVICE]: Using instantiated LibraryService");
m_LibraryService = ServerUtils.LoadPlugin<ILibraryService>(libService, args);
}
m_GatekeeperConnector = new GatekeeperServiceConnector();
if (!Initialized)
{
Initialized = true;
RegisterCommands();
}
m_log.DebugFormat("[LLOGIN SERVICE]: Starting...");
}
示例13: UserController
public UserController(IUserService userService, IAvatarService avatarService)
{
_userService = userService;
_avatarService = avatarService;
}
示例14: PostInitialize
public void PostInitialize(IConfigSource config, IRegistryCore registry)
{
m_UserAccountService = registry.RequestModuleInterface<IUserAccountService>();
m_GridUserService = registry.RequestModuleInterface<IGridUserService>();
m_AuthenticationService = registry.RequestModuleInterface<IAuthenticationService>();
m_InventoryService = registry.RequestModuleInterface<IInventoryService>();
m_GridService = registry.RequestModuleInterface<IGridService>();
m_PresenceService = registry.RequestModuleInterface<IPresenceService>();
m_AvatarService = registry.RequestModuleInterface<IAvatarService>();
m_FriendsService = registry.RequestModuleInterface<IFriendsService>();
m_SimulationService = registry.RequestModuleInterface<ISimulationService>();
m_AssetService = registry.RequestModuleInterface<IAssetService>();
m_LibraryService = registry.RequestModuleInterface<ILibraryService>();
m_CapsService = registry.RequestModuleInterface<ICapsService>();
}
示例15: Start
public void Start (IConfigSource config, IRegistryCore registry)
{
m_registry = registry;
userAccountService = registry.RequestModuleInterface<IUserAccountService> ();
avatarService = registry.RequestModuleInterface<IAvatarService> ();
assetService = registry.RequestModuleInterface<IAssetService> ();
assetGatherer = new UuidGatherer (assetService);
inventoryService = registry.RequestModuleInterface<IInventoryService> ();
m_registry.RegisterModuleInterface<IAvatarAppearanceArchiver> (this);
}