.. 내가 예에서 복사 벌금 SterlingService.cs이 .. 같이 시작
<Application.ApplicationLifetimeObjects>
<common:SterlingService />
<appServices:WebContext>
<appServices:WebContext.Authentication>
<!--<appsvc:FormsAuthentication/>-->
<appsvc:WindowsAuthentication />
</appServices:WebContext.Authentication>
</appServices:WebContext>
</Application.ApplicationLifetimeObjects>
일반적인 참조를 내 정상적인 실버 라이트 프로젝트에 순은을 사용하고 내가 뭐하는 거지 모두가 App.xaml이 추가됩니다 이
namespace Common
{
public sealed class SterlingService : IApplicationService, IApplicationLifetimeAware, IDisposable
{
public const long KILOBYTE = 1024;
public const long MEGABYTE = 1024 * KILOBYTE;
public const long QUOTA = 100 * MEGABYTE;
private SterlingEngine _engine;
private static readonly ISterlingDriver _driver = new IsolatedStorageDriver(); // could use this: new MemoryDriver();
public static SterlingService Current { get; private set; }
}
나중에 난 그냥 .. 한혜진 등이 서비스의 래퍼를 생성하고 난 그냥 지금 난과 같이 서비스를 참조 할 필요가 SterlingService 전화 ... 희망이 도움이됩니다.
[ExportService(ServiceType.Runtime, typeof(IOffLineDataService))]
public sealed class OfflineDataService : IOffLineDataService
{
User user = WebContext.Current.User;
public OfflineDataService()
{
}
public void PurgeAll(Action<Exception> callback)
{
try
{
SterlingService.Current.Database.Purge();
callback(null);
}
catch (Exception ex)
{
Error.LogError(ex, user);
callback(new Exception(ErrorMessages.OfflinePurgeAll));
}
}
}
답변을 드리려고했는데 ...--). 나는 그것이 그런 식으로 일했으나 '이 WE에 대답하는 것'을 얻지 못했을 것이라고 추측했다. – AxelEckenberger
고마워, 로랑. 그것은 많은 의미가 있습니다. 나는 코드를 보면서 이러한 질문에 대답 할 수있는 것에 더 가까워지고 있지만, 나는 아직 그곳에 있지 않다. 언제나처럼 도움을 주셔서 감사합니다. –