本文整理汇总了C#中ILibraryService类的典型用法代码示例。如果您正苦于以下问题:C# ILibraryService类的具体用法?C# ILibraryService怎么用?C# ILibraryService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ILibraryService类属于命名空间,在下文中一共展示了ILibraryService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RexLoginResponse
public RexLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo,
GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService,
string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message,
GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL)
: base(account, aCircuit, pinfo, destination, invSkel, friendsList, libService, where, startlocation,
position, lookAt, gestures, message, home, clientIP, mapTileURL, searchURL)
{
}
示例2: Start
public virtual void Start(IConfigSource config, IRegistryCore registry)
{
m_Database = Aurora.DataManager.DataManager.RequestPlugin<IInventoryData> ();
m_UserAccountService = registry.RequestModuleInterface<IUserAccountService>();
m_LibraryService = registry.RequestModuleInterface<ILibraryService>();
m_AssetService = registry.RequestModuleInterface<IAssetService>();
}
示例3: ArtistPageViewModel
public ArtistPageViewModel(
INavigationService navigationService,
ILibraryService libraryService,
IEnumerable<IMetadataProvider> metadataProviders,
IConverter<WebAlbum, Album> webAlbumConverter,
IConverter<WebArtist, Artist> webArtistConverter,
IConverter<WebSong, Track> webSongConverter,
ISettingsUtility settingsUtility)
{
_navigationService = navigationService;
_libraryService = libraryService;
_webAlbumConverter = webAlbumConverter;
_metadataProviders = metadataProviders.FilterAndSort<IExtendedMetadataProvider>();
_webArtistConverter = webArtistConverter;
_webSongConverter = webSongConverter;
_settingsUtility = settingsUtility;
AlbumClickCommand = new DelegateCommand<ItemClickEventArgs>(AlbumClickExecute);
WebAlbumClickCommand = new DelegateCommand<ItemClickEventArgs>(WebAlbumClickExecute);
if (IsInDesignMode)
{
OnNavigatedTo("Childish Gambino", NavigationMode.New, new Dictionary<string, object>());
}
}
示例4: SongsPageViewModel
public SongsPageViewModel(
ILibraryCollectionService libraryCollectionService,
ILibraryService libraryService,
ISettingsUtility settingsUtility,
IPlayerService playerService)
{
_libraryCollectionService = libraryCollectionService;
_settingsUtility = settingsUtility;
_playerService = playerService;
LibraryService = libraryService;
SortItems =
Enum.GetValues(typeof (TrackSort))
.Cast<TrackSort>()
.Select(sort => new ListBoxItem { Content = sort.GetEnumText(), Tag = sort })
.ToList();
SortChangedCommand = new DelegateCommand<ListBoxItem>(SortChangedExecute);
ShuffleAllCommand = new DelegateCommand(ShuffleAllExecute);
var defaultSort = _settingsUtility.Read(ApplicationSettingsConstants.SongSort,
TrackSort.DateAdded,
SettingsStrategy.Roam);
DefaultSort = SortItems.IndexOf(SortItems.FirstOrDefault(p => (TrackSort)p.Tag == defaultSort));
ChangeSort(defaultSort);
}
示例5: SyncClientService
public SyncClientService(ILibraryService libraryService, IAudioFileCacheService audioFileCacheService, ISyncDeviceSpecifications deviceSpecifications)
{
_libraryService = libraryService;
_audioFileCacheService = audioFileCacheService;
_deviceSpecifications = deviceSpecifications;
Initialize();
}
示例6: LibrariesController
public LibrariesController(ILibraryService libraryService , IUsersService usersService , IBookService bookssService , ICategoryService categoriesService)
{
this.libraryService = libraryService;
this.usersService = usersService;
this.booksService = bookssService;
this.categoriesService = categoriesService;
}
示例7: RexLoginService
public RexLoginService(IConfigSource config, ISimulationService simService, ILibraryService libraryService)
: base(config, simService, libraryService)
{
//TODO: Read configuration about m_UseOSInventory
//TODO: Read configuration about rexavatar
//TODO: Load rexavatar plugin
}
示例8: LoadLibrary
public void LoadLibrary(ILibraryService service, IConfigSource source, IRegistryCore registry)
{
m_service = service;
IConfig assetConfig = source.Configs["DefaultXMLAssetLoader"];
if (assetConfig == null){
return;
}
string loaderArgs = assetConfig.GetString("AssetLoaderArgs",
String.Empty);
bool assetLoaderEnabled = !assetConfig.GetBoolean("PreviouslyLoaded", false);
if (!assetLoaderEnabled)
return;
registry.RegisterModuleInterface<DefaultAssetXMLLoader>(this);
MainConsole.Instance.InfoFormat("[DefaultXMLAssetLoader]: Loading default asset set from {0}", loaderArgs);
IAssetService assetService = registry.RequestModuleInterface<IAssetService>();
ForEachDefaultXmlAsset(loaderArgs,
delegate(AssetBase a)
{
if (!assetLoaderEnabled && assetService.GetExists(a.IDString))
return;
assetService.Store(a);
});
}
示例9: EditViewModel
public EditViewModel(ILibraryService libraryService, IEventAggregator eventAggregator)
{
this._eventAggregator = eventAggregator;
var orderedEnumerable = libraryService.GetObjectsFromFile().Videos.OrderBy(v=>v.Category).ToList();
this.Videos = new ObservableCollection<Video>(orderedEnumerable);
this.SelectedVideo = this.Videos.FirstOrDefault();
}
示例10: WebFetchInvDescServerConnector
public WebFetchInvDescServerConnector(IConfigSource config, IHttpServer server, string configName) :
base(config, server, configName)
{
if (configName != String.Empty)
m_ConfigName = configName;
IConfig serverConfig = config.Configs[m_ConfigName];
if (serverConfig == null)
throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
string invService = serverConfig.GetString("InventoryService", String.Empty);
if (invService == String.Empty)
throw new Exception("No InventoryService in config file");
Object[] args = new Object[] { config };
m_InventoryService =
ServerUtils.LoadPlugin<IInventoryService>(invService, args);
if (m_InventoryService == null)
throw new Exception(String.Format("Failed to load InventoryService from {0}; config is {1}", invService, m_ConfigName));
string libService = serverConfig.GetString("LibraryService", String.Empty);
m_LibraryService =
ServerUtils.LoadPlugin<ILibraryService>(libService, args);
WebFetchInvDescHandler webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService);
IRequestHandler reqHandler = new RestStreamHandler("POST", "/CAPS/WebFetchInvDesc/" /*+ UUID.Random()*/, webFetchHandler.FetchInventoryDescendentsRequest);
server.AddStreamHandler(reqHandler);
}
示例11: LoadLibrary
public void LoadLibrary(ILibraryService service, IConfigSource source, IRegistryCore registry)
{
m_service = service;
m_registry = registry;
m_Database = Framework.Utilities.DataManager.RequestPlugin<IInventoryData>();
IConfig libConfig = source.Configs["InventoryIARLoader"];
const string pLibrariesLocation = "DefaultInventory/";
AddDefaultAssetTypes();
if (libConfig != null)
{
if (libConfig.GetBoolean("WipeLibrariesOnNextLoad", false))
{
service.ClearDefaultInventory(); //Nuke it
libConfig.Set("WipeLibrariesOnNextLoad", false);
source.Save();
}
if (libConfig.GetBoolean("PreviouslyLoaded", false))
return; //If it is loaded, don't reload
foreach (string iarFileName in Directory.GetFiles(pLibrariesLocation, "*.iar"))
{
LoadLibraries(iarFileName);
}
}
}
示例12: LibraryMatchingService
public LibraryMatchingService(ILibraryService libraryService, IMatchEngineService matchEngineService,
IInsightsService insightsService, IDownloadService downloadService)
{
_libraryService = libraryService;
_matchEngineService = matchEngineService;
_insightsService = insightsService;
_downloadService = downloadService;
}
示例13: Start
public virtual void Start(IConfigSource config, IRegistryCore registry)
{
m_Database = DataManager.RequestPlugin<IInventoryData>();
m_UserAccountService = registry.RequestModuleInterface<IUserAccountService>();
m_LibraryService = registry.RequestModuleInterface<ILibraryService>();
m_AssetService = registry.RequestModuleInterface<IAssetService>();
registry.RequestModuleInterface<ISimulationBase>().EventManager.RegisterEventHandler("DeleteUserInformation", DeleteUserInformation);
}
示例14: IncomingCapsRequest
public void IncomingCapsRequest (UUID agentID, Framework.Services.GridRegion region, ISimulationBase simbase, ref OSDMap capURLs)
{
m_agentID = agentID;
m_moneyModule = simbase.ApplicationRegistry.RequestModuleInterface<IMoneyModule> ();
m_assetService = simbase.ApplicationRegistry.RequestModuleInterface<IAssetService> ();
m_inventoryService = simbase.ApplicationRegistry.RequestModuleInterface<IInventoryService> ();
m_libraryService = simbase.ApplicationRegistry.RequestModuleInterface<ILibraryService> ();
m_inventoryData = Framework.Utilities.DataManager.RequestPlugin<IInventoryData> ();
HttpServerHandle method;
string uri;
method = (path, request, httpRequest, httpResponse) => HandleFetchInventoryDescendents (request, m_agentID);
uri = "/CAPS/FetchInventoryDescendents/" + UUID.Random () + "/";
capURLs ["WebFetchInventoryDescendents"] = MainServer.Instance.ServerURI + uri;
capURLs ["FetchInventoryDescendents"] = MainServer.Instance.ServerURI + uri;
capURLs ["FetchInventoryDescendents2"] = MainServer.Instance.ServerURI + uri;
m_uris.Add (uri);
MainServer.Instance.AddStreamHandler (new GenericStreamHandler ("POST", uri, method));
method = (path, request, httpRequest, httpResponse) => HandleFetchLibDescendents (request, m_agentID);
uri = "/CAPS/FetchLibDescendents/" + UUID.Random () + "/";
capURLs ["FetchLibDescendents"] = MainServer.Instance.ServerURI + uri;
capURLs ["FetchLibDescendents2"] = MainServer.Instance.ServerURI + uri;
m_uris.Add (uri);
MainServer.Instance.AddStreamHandler (new GenericStreamHandler ("POST", uri, method));
method = (path, request, httpRequest, httpResponse) => HandleFetchInventory (request, m_agentID);
uri = "/CAPS/FetchInventory/" + UUID.Random () + "/";
capURLs ["FetchInventory"] = MainServer.Instance.ServerURI + uri;
capURLs ["FetchInventory2"] = MainServer.Instance.ServerURI + uri;
m_uris.Add (uri);
MainServer.Instance.AddStreamHandler (new GenericStreamHandler ("POST", uri, method));
method = (path, request, httpRequest, httpResponse) => HandleFetchLib (request, m_agentID);
uri = "/CAPS/FetchLib/" + UUID.Random () + "/";
capURLs ["FetchLib"] = MainServer.Instance.ServerURI + uri;
capURLs ["FetchLib2"] = MainServer.Instance.ServerURI + uri;
m_uris.Add (uri);
MainServer.Instance.AddStreamHandler (new GenericStreamHandler ("POST", uri, method));
uri = "/CAPS/NewFileAgentInventory/" + UUID.Random () + "/";
capURLs ["NewFileAgentInventory"] = MainServer.Instance.ServerURI + uri;
m_uris.Add (uri);
MainServer.Instance.AddStreamHandler (new GenericStreamHandler ("POST", uri, NewAgentInventoryRequest));
uri = "/CAPS/NewFileAgentInventoryVariablePrice/" + UUID.Random () + "/";
capURLs ["NewFileAgentInventoryVariablePrice"] = MainServer.Instance.ServerURI + uri;
m_uris.Add (uri);
MainServer.Instance.AddStreamHandler (new GenericStreamHandler ("POST", uri, NewAgentInventoryRequestVariablePrice));
uri = "/CAPS/CreateInventoryCategory/" + UUID.Random () + "/";
capURLs ["CreateInventoryCategory"] = MainServer.Instance.ServerURI + uri;
m_uris.Add (uri);
MainServer.Instance.AddStreamHandler (new GenericStreamHandler ("POST", uri, CreateInventoryCategory));
}
示例15: RegisterCaps
public void RegisterCaps(IRegionClientCapsService service)
{
m_service = service;
m_assetService = service.Registry.RequestModuleInterface<IAssetService>();
m_inventoryService = service.Registry.RequestModuleInterface<IInventoryService>();
m_libraryService = service.Registry.RequestModuleInterface<ILibraryService>();
RestBytesMethod method = delegate(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
return HandleWebFetchInventoryDescendents(request, m_service.AgentID);
};
service.AddStreamHandler("WebFetchInventoryDescendents",
new RestBytesStreamHandler("POST", service.CreateCAPS("WebFetchInventoryDescendents", ""),
method));
method = delegate(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
return HandleFetchLibDescendents(request, m_service.AgentID);
};
service.AddStreamHandler("FetchLibDescendents",
new RestBytesStreamHandler("POST", service.CreateCAPS("FetchLibDescendents", ""),
method));
method = delegate(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
return HandleFetchInventory(request, m_service.AgentID);
};
service.AddStreamHandler("FetchInventory",
new RestBytesStreamHandler("POST", service.CreateCAPS("FetchInventory", ""),
method));
method = delegate(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
return HandleFetchLib(request, m_service.AgentID);
};
service.AddStreamHandler("FetchLib",
new RestBytesStreamHandler("POST", service.CreateCAPS("FetchLib", ""),
method));
service.AddStreamHandler("NewFileAgentInventory",
new RestStreamHandler("POST", service.CreateCAPS("NewFileAgentInventory", m_newInventory),
NewAgentInventoryRequest));
/*method = delegate(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
return HandleInventoryItemCreate(request, m_service.AgentID);
};
service.AddStreamHandler("InventoryItemCreate",
new RestBytesStreamHandler("POST", service.CreateCAPS("InventoryItemCreate", ""),
method));*/
}