Ejemplo n.º 1
0
 public static void LinkChild(AbstractLogger logger, IGuestControllerClient guestControllerClient, string childSwid, string childAccessToken, Action <ILinkChildResult> callback)
 {
     try
     {
         LinkChildRequest linkChildRequest = new LinkChildRequest();
         linkChildRequest.authZToken = childAccessToken;
         LinkChildRequest request = linkChildRequest;
         guestControllerClient.LinkChild(request, childSwid, delegate(GuestControllerResult <GuestControllerWebCallResponse> r)
         {
             if (!r.Success)
             {
                 callback(MakeGenericFailure());
             }
             else if (r.Response.error != null)
             {
                 callback(ParseError(r.Response));
             }
             else
             {
                 callback(new LinkChildResult(success: true));
             }
         });
     }
     catch (Exception ex)
     {
         logger.Critical("Unhandled exception: " + ex);
         callback(MakeGenericFailure());
     }
 }
Ejemplo n.º 2
0
 public NotificationPoller(AbstractLogger logger, IMixWebCallFactory webCallFactory, INotificationQueue queue, IStopwatch pollCountdownStopwatch, IGetStateResponseParser getStateResponseParser, IEpochTime epochTime, IRandom random, IDatabase database, string localUserSwid)
 {
     usePollIntervals        = true;
     missedNotificationTimes = new Dictionary <long, long>();
     isPaused                    = true;
     this.logger                 = logger;
     this.webCallFactory         = webCallFactory;
     this.queue                  = queue;
     this.pollCountdownStopwatch = pollCountdownStopwatch;
     this.getStateResponseParser = getStateResponseParser;
     this.epochTime              = epochTime;
     this.random                 = random;
     this.database               = database;
     this.localUserSwid          = localUserSwid;
     PollIntervals               = new int[1] {
         2147483647
     };
     PokeIntervals = new int[1] {
         2147483647
     };
     MaximumMissingNotificationTime = int.MaxValue;
     Jitter              = 0;
     IntervalIndex       = 0;
     queue.OnQueued     += HandleQueued;
     queue.OnDispatched += HandleQueueDispatched;
 }
Ejemplo n.º 3
0
 public static void LinkClaimableChildren(AbstractLogger logger, IGuestControllerClient guestControllerClient, IEnumerable <string> childSwids, Action <ILinkChildResult> callback)
 {
     try
     {
         LinkClaimableChildrenRequest linkClaimableChildrenRequest = new LinkClaimableChildrenRequest();
         linkClaimableChildrenRequest.swids = childSwids.ToArray();
         LinkClaimableChildrenRequest request = linkClaimableChildrenRequest;
         guestControllerClient.LinkClaimableChildren(request, delegate(GuestControllerResult <GuestControllerWebCallResponse> r)
         {
             if (!r.Success)
             {
                 callback(MakeGenericFailure());
             }
             else if (r.Response.error != null)
             {
                 callback(ParseError(r.Response));
             }
             else
             {
                 callback(new LinkChildResult(success: true));
             }
         });
     }
     catch (Exception ex)
     {
         logger.Critical("Unhandled exception: " + ex);
         callback(MakeGenericFailure());
     }
 }
 private static void HandleGetLinkedChildrenResult(AbstractLogger logger, IMixWebCallFactory mixWebCallFactory, Action <IGetLinkedUsersResult> callback, GuestControllerResult <ChildrenResponse> result)
 {
     try
     {
         if (!result.Success || result.Response.error != null)
         {
             callback(MakeGenericFailure());
         }
         else
         {
             List <Profile> list = (result.Response.data == null) ? null : result.Response.data.children;
             if (list == null)
             {
                 callback(MakeGenericFailure());
             }
             else
             {
                 LinkedUsersGetter.Get(logger, mixWebCallFactory, list, delegate(LinkedUser[] users)
                 {
                     callback((users == null) ? MakeGenericFailure() : new GetLinkedUsersResult(success: true, users));
                 });
             }
         }
     }
     catch (Exception arg)
     {
         logger.Critical("Unhandled exception: " + arg);
         callback(MakeGenericFailure());
     }
 }
Ejemplo n.º 5
0
 public SessionRestorer(AbstractLogger logger, IGuestControllerClientFactory guestControllerClientFactory, IDatabase database, ISessionFactory sessionFactory)
 {
     this.logger = logger;
     this.guestControllerClientFactory = guestControllerClientFactory;
     this.database       = database;
     this.sessionFactory = sessionFactory;
 }
Ejemplo n.º 6
0
 private void GameForm_Load(object sender, EventArgs e)
 {
     AllocConsole();
     chatLog     = gameLog;
     loggerChain = getChainOfLoggers();
     loggerChain.logMessage(AbstractLogger.DEBUG, "Form loaded");
 }
Ejemplo n.º 7
0
 public Session(AbstractLogger logger, IInternalLocalUser localUser, string guestControllerAccessToken, bool pushNotificationsEnabled, INotificationPoller notificationPoller, ICoroutineManager coroutineManager, IDatabase database, IUserDatabase userDatabase, IGuestControllerClient guestControllerClient, IMixWebCallFactory mixWebCallFactory, IEpochTime epochTime, DatabaseCorruptionHandler databaseCorruptionHandler, ISessionStatus sessionStatus, IKeychain keychain, IGetStateResponseParser getStateResponseParser, string clientVersion, INotificationQueue notificationQueue)
 {
     this.logger                                     = logger;
     this.localUser                                  = localUser;
     this.notificationPoller                         = notificationPoller;
     this.coroutineManager                           = coroutineManager;
     this.database                                   = database;
     this.userDatabase                               = userDatabase;
     this.guestControllerClient                      = guestControllerClient;
     this.mixWebCallFactory                          = mixWebCallFactory;
     this.epochTime                                  = epochTime;
     this.databaseCorruptionHandler                  = databaseCorruptionHandler;
     this.sessionStatus                              = sessionStatus;
     this.keychain                                   = keychain;
     this.getStateResponseParser                     = getStateResponseParser;
     this.clientVersion                              = clientVersion;
     this.notificationQueue                          = notificationQueue;
     GuestControllerAccessToken                      = guestControllerAccessToken;
     guestControllerClient.OnAccessTokenChanged     += HandleGuestControllerAccessTokenChanged;
     guestControllerClient.OnAuthenticationLost     += HandleAuthenticationLost;
     mixWebCallFactory.OnAuthenticationLost         += HandleAuthenticationLost;
     localUser.OnPushNotificationsToggled           += HandlePushNotificationsToggled;
     localUser.OnPushNotificationReceived           += HandlePushNotificationReceived;
     localUser.OnDisplayNameUpdated                 += HandleDisplayNameUpdated;
     databaseCorruptionHandler.OnCorruptionDetected += HandleCorruptionDetected;
     updateEnumerator                                = Update();
     coroutineManager.Start(updateEnumerator);
     notificationPoller.OnNotificationsPolled += HandleNotificationsPolled;
     notificationPoller.UsePollIntervals       = !pushNotificationsEnabled;
     this.sessionStatus.IsPaused = true;
     notificationPoller.OnSynchronizationError += HandleNotificationPollerSynchronizationError;
 }
 public DatabaseCorruptionHandler(AbstractLogger logger, IFileSystem fileSystem, string sdkStorageDirPath)
 {
     this.logger            = logger;
     this.fileSystem        = fileSystem;
     this.sdkStorageDirPath = sdkStorageDirPath;
     deleters = new Dictionary <object, Action>();
 }
Ejemplo n.º 9
0
        public void testLogger()
        {
            AbstractLogger logger = Init.Log();

            logger.LogMessage(AbstractLogger.Error, "SAlut");
            logger.LogMessage(AbstractLogger.Info, "yo");
        }
Ejemplo n.º 10
0
 public static void ModerateText(AbstractLogger logger, IMixWebCallFactory mixWebCallFactory, string text, bool isTrusted, Action <ModerateTextResponse> successCallback, Action failureCallback)
 {
     try
     {
         ModerateTextRequest moderateTextRequest = new ModerateTextRequest();
         moderateTextRequest.Text             = text;
         moderateTextRequest.ModerationPolicy = (isTrusted ? "Trusted" : "UnTrusted");
         ModerateTextRequest request = moderateTextRequest;
         IWebCall <ModerateTextRequest, ModerateTextResponse> webCall = mixWebCallFactory.ModerationTextPut(request);
         webCall.OnResponse += delegate(object sender, WebCallEventArgs <ModerateTextResponse> e)
         {
             ModerateTextResponse response = e.Response;
             if (ValidateModerateTextResponse(response))
             {
                 successCallback(response);
             }
             else
             {
                 logger.Critical("Failed to validate moderate text response: " + JsonParser.ToJson(response));
                 failureCallback();
             }
         };
         webCall.OnError += delegate
         {
             failureCallback();
         };
         webCall.Execute();
     }
     catch (Exception ex)
     {
         logger.Critical("Unhandled exception: " + ex);
         failureCallback();
     }
 }
Ejemplo n.º 11
0
 public static void GetRequirements(AbstractLogger logger, string countryCode, IMixWebCallFactory mixWebCallFactory, Action <bool, bool> successCallback, Action failureCallback)
 {
     try
     {
         PilCheckRequest pilCheckRequest = new PilCheckRequest();
         pilCheckRequest.PersonalInformationUsage = "PUBLIC_DISCLOSURE";
         pilCheckRequest.CountryCode = countryCode;
         PilCheckRequest request = pilCheckRequest;
         IWebCall <PilCheckRequest, PilCheckResponse> webCall = mixWebCallFactory.PilCheckPost(request);
         webCall.OnResponse += delegate(object sender, WebCallEventArgs <PilCheckResponse> e)
         {
             bool?adultVerificationRequired  = e.Response.AdultVerificationRequired;
             bool?adultVerificationAvailable = e.Response.AdultVerificationAvailable;
             if (!adultVerificationRequired.HasValue || !adultVerificationAvailable.HasValue)
             {
                 failureCallback();
             }
             else
             {
                 successCallback(adultVerificationRequired.Value, adultVerificationAvailable.Value);
             }
         };
         webCall.OnError += delegate
         {
             failureCallback();
         };
         webCall.Execute();
     }
     catch (Exception ex)
     {
         logger.Critical("Unhandled exception: " + ex);
         failureCallback();
     }
 }
Ejemplo n.º 12
0
 public static void SetAway(AbstractLogger logger, IMixWebCallFactory mixWebCallFactory, Action <BaseResponse> successCallback, Action failureCallback)
 {
     try
     {
         SetPresenceRequest setPresenceRequest = new SetPresenceRequest();
         setPresenceRequest.State = "away";
         SetPresenceRequest request = setPresenceRequest;
         IWebCall <SetPresenceRequest, BaseResponse> webCall = mixWebCallFactory.PresencePut(request);
         webCall.OnResponse += delegate(object sender, WebCallEventArgs <BaseResponse> e)
         {
             BaseResponse response = e.Response;
             successCallback(response);
         };
         webCall.OnError += delegate
         {
             failureCallback();
         };
         webCall.Execute();
     }
     catch (Exception arg)
     {
         logger.Critical("Unhandled exception: " + arg);
         failureCallback();
     }
 }
Ejemplo n.º 13
0
        /// <summary>
        /// Turns a System.Diagnostic.StackFrame[] into a <see cref="Stacktrace" /> list which can be reported to the APM Server
        /// </summary>
        /// <param name="capturingFor">Just for logging.</param>
        /// <returns>A prepared List that can be passed to the APM server</returns>
        internal static List <Stacktrace> GenerateApmStackTrace(StackFrame[] frames, AbstractLogger logger, string capturingFor)
        {
            var retVal = new List <Stacktrace>(frames.Length);

            try
            {
                retVal.AddRange(from item in frames
                                let fileName = item?.GetMethod()?.DeclaringType?.Assembly?.GetName()?.Name
                                               where !string.IsNullOrEmpty(fileName)
                                               select new Stacktrace
                {
                    Function = item?.GetMethod()?.Name,
                    FileName = fileName,
                    Module   = item?.GetMethod()?.ReflectedType?.Name,
                    LineNo   = item?.GetFileLineNumber() ?? 0
                });
            }
            catch (Exception e)
            {
                logger.LogWarning($"Failed capturing stacktrace for {capturingFor}");
                logger.LogDebug($"{e.GetType().Name}: {e.Message}");
            }

            return(retVal);
        }
Ejemplo n.º 14
0
 public static void GetPermission(AbstractLogger logger, IGuestControllerClient guestControllerClient, string activityCode, string childSwid, Action <IPermissionResult> callback)
 {
     if (string.IsNullOrEmpty(childSwid) || string.IsNullOrEmpty(activityCode))
     {
         callback(new PermissionFailedInvalidResult());
         return;
     }
     try
     {
         guestControllerClient.GetPermission(childSwid, delegate(GuestControllerResult <GetPermissionsResponse> r)
         {
             if (!r.Success)
             {
                 callback(MakeGenericFailure());
             }
             else if (r.Response.error != null || r.Response.data == null)
             {
                 callback(MakeGenericFailure());
             }
             else
             {
                 Permission permission         = r.Response.data.activityPermissions.FirstOrDefault((Permission ap) => ap.activityCode == activityCode);
                 ActivityApprovalStatus status = ((permission == null) ? ActivityApprovalStatus.Unknown : ActivityApprovalStatusConverter.Convert(permission.approvalStatus));
                 callback(new PermissionResult(success: true, status));
             }
         });
     }
     catch (Exception ex)
     {
         logger.Critical("Unhandled exception: " + ex);
         callback(MakeGenericFailure());
     }
 }
Ejemplo n.º 15
0
 public SessionReuser(AbstractLogger logger, IDatabase database, IMixSessionStarter mixSessionStarter, ISessionFactory sessionFactory)
 {
     this.logger            = logger;
     this.database          = database;
     this.mixSessionStarter = mixSessionStarter;
     this.sessionFactory    = sessionFactory;
 }
Ejemplo n.º 16
0
 private static void HandleGetStateSuccess(AbstractLogger logger, IEpochTime epochTime, IDatabase database, IUserDatabase userDatabase, INotificationQueue notificationQueue, GetStateResponse response, IMixWebCallFactory mixWebCallFactory, Action <GetStateResponse> successCallback, Action failureCallback)
 {
     try
     {
         if (ValidateResponse(response))
         {
             epochTime.ReferenceTime = response.Timestamp.Value;
             database.SetServerTimeOffsetMillis((long)epochTime.Offset.TotalMilliseconds);
             logger.Debug("New time offset: " + epochTime.Offset);
             successCallback(response);
             notificationQueue.LatestSequenceNumber = response.NotificationSequenceCounter.Value;
         }
         else
         {
             logger.Critical("Error validating get state response: " + JsonParser.ToJson(response));
             failureCallback();
             notificationQueue.Clear();
         }
     }
     catch (Exception ex)
     {
         logger.Critical("Unhandled exception: " + ex);
         failureCallback();
         notificationQueue.Clear();
     }
 }
Ejemplo n.º 17
0
 public LocalUser(AbstractLogger logger, IDisplayName displayName, string swid, IList <IInternalFriend> friends, AgeBandType ageBandType, IDatabase database, IUserDatabase userDatabase, IInternalRegistrationProfile registrationProfile, IMixWebCallFactory mixWebCallFactory, IGuestControllerClient guestControllerClient, INotificationQueue notificationQueue, IEncryptor encryptor, IEpochTime epochTime)
 {
     DisplayName = displayName;
     FirstName   = registrationProfile.FirstName;
     Swid        = swid;
     Id          = swid;
     this.logger = logger;
     this.registrationProfile   = registrationProfile;
     this.mixWebCallFactory     = mixWebCallFactory;
     this.friends               = friends;
     this.ageBandType           = ageBandType;
     this.database              = database;
     this.userDatabase          = userDatabase;
     incomingFriendInvitations  = new List <IInternalIncomingFriendInvitation>();
     outgoingFriendInvitations  = new List <IInternalOutgoingFriendInvitation>();
     oldInvitationIds           = new List <long>();
     unidentifiedUsers          = new List <IInternalUnidentifiedUser>();
     this.guestControllerClient = guestControllerClient;
     this.notificationQueue     = notificationQueue;
     this.encryptor             = encryptor;
     this.epochTime             = epochTime;
     guestControllerClient.OnLegalMarketingUpdateRequired += delegate(object sender, AbstractLegalMarketingUpdateRequiredEventArgs e)
     {
         this.OnLegalMarketingUpdateRequired(this, e);
     };
 }
Ejemplo n.º 18
0
 public static void GetState(AbstractLogger logger, IEpochTime epochTime, string clientVersion, IDatabase database, IUserDatabase userDatabase, INotificationQueue notificationQueue, IMixWebCallFactory mixWebCallFactory, string localUserId, long lastNotificationTime, Action <GetStateResponse> successCallback, Action failureCallback)
 {
     try
     {
         GetStateRequest getStateRequest = new GetStateRequest();
         getStateRequest.UserId        = localUserId;
         getStateRequest.ClientVersion = clientVersion;
         GetStateRequest request = getStateRequest;
         IWebCall <GetStateRequest, GetStateResponse> webCall = mixWebCallFactory.StatePost(request);
         webCall.OnResponse += delegate(object sender, WebCallEventArgs <GetStateResponse> e)
         {
             HandleGetStateSuccess(logger, epochTime, database, userDatabase, notificationQueue, e.Response, mixWebCallFactory, successCallback, failureCallback);
         };
         webCall.OnError += delegate
         {
             failureCallback();
         };
         webCall.Execute();
     }
     catch (Exception ex)
     {
         logger.Critical("Unhandled exception: " + ex);
         failureCallback();
     }
 }
Ejemplo n.º 19
0
 public static bool StoreProfile(AbstractLogger logger, IDatabase database, IEpochTime epochTime, string swid, ProfileData profileData)
 {
     Disney.Mix.SDK.Internal.GuestControllerDomain.DisplayName displayNameData = profileData.displayName;
     if (displayNameData != null)
     {
         try
         {
             database.UpdateSessionDocument(swid, delegate(SessionDocument doc)
             {
                 doc.DisplayNameText           = displayNameData.displayName;
                 doc.ProposedDisplayName       = displayNameData.proposedDisplayName;
                 doc.ProposedDisplayNameStatus = displayNameData.proposedStatus;
                 doc.FirstName = profileData.profile.firstName;
                 doc.LastProfileRefreshTime = epochTime.Seconds;
                 doc.AccountStatus          = profileData.profile.status;
             });
         }
         catch (Exception arg)
         {
             logger.Critical("Unhandled exception: " + arg);
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 20
0
 public static void Report(AbstractLogger logger, IMixWebCallFactory mixWebCallFactory, string userId, ReportUserReason reason, Action successCallback, Action failureCallback)
 {
     try
     {
         ReportPlayerRequest reportPlayerRequest = new ReportPlayerRequest();
         reportPlayerRequest.ReportedUserId = userId;
         reportPlayerRequest.Reason         = reason.ToString();
         ReportPlayerRequest request = reportPlayerRequest;
         IWebCall <ReportPlayerRequest, BaseResponse> webCall = mixWebCallFactory.ModerationReportPlayerPut(request);
         webCall.OnResponse += delegate
         {
             successCallback();
         };
         webCall.OnError += delegate
         {
             failureCallback();
         };
         webCall.Execute();
     }
     catch (Exception ex)
     {
         logger.Critical("Unhandled exception: " + ex);
         failureCallback();
     }
 }
Ejemplo n.º 21
0
 public SessionFactory(AbstractLogger logger, ICoroutineManager coroutineManager, IStopwatch pollCountdownStopwatch, IEpochTime epochTime, DatabaseCorruptionHandler databaseCorruptionHandler, INotificationQueue notificationQueue, INotificationDispatcher notificationDispatcher, ISessionStatus sessionStatus, IMixWebCallFactoryFactory mixWebCallFactoryFactory, IWebCallEncryptorFactory webCallEncryptorFactory, IMixSessionStarter mixSessionStarter, IKeychain keychain, ISessionRefresherFactory sessionRefresherFactory, IGuestControllerClientFactory guestControllerClientFactory, IRandom random, IEncryptor encryptor, IFileSystem fileSystem, IWwwCallFactory wwwCallFactory, string localStorageDirPath, string clientVersion, IDatabaseDirectoryCreator databaseDirectoryCreator, IDocumentCollectionFactory documentCollectionFactory, IDatabase database)
 {
     this.logger                       = logger;
     this.coroutineManager             = coroutineManager;
     this.pollCountdownStopwatch       = pollCountdownStopwatch;
     this.epochTime                    = epochTime;
     this.databaseCorruptionHandler    = databaseCorruptionHandler;
     this.notificationQueue            = notificationQueue;
     this.notificationDispatcher       = notificationDispatcher;
     this.sessionStatus                = sessionStatus;
     this.mixWebCallFactoryFactory     = mixWebCallFactoryFactory;
     this.webCallEncryptorFactory      = webCallEncryptorFactory;
     this.mixSessionStarter            = mixSessionStarter;
     this.keychain                     = keychain;
     this.sessionRefresherFactory      = sessionRefresherFactory;
     this.guestControllerClientFactory = guestControllerClientFactory;
     this.random                       = random;
     this.encryptor                    = encryptor;
     this.fileSystem                   = fileSystem;
     this.wwwCallFactory               = wwwCallFactory;
     this.localStorageDirPath          = localStorageDirPath;
     this.clientVersion                = clientVersion;
     this.databaseDirectoryCreator     = databaseDirectoryCreator;
     this.documentCollectionFactory    = documentCollectionFactory;
     this.database                     = database;
 }
Ejemplo n.º 22
0
        /// <summary>
        /// Turns a System.Diagnostic.StackFrame[] into a <see cref="Stacktrace"/> list which can be reported to the APM Server
        /// </summary>
        /// <param name="capturingFor">Just for logging.</param>
        /// <returns>A prepared List that can be passed to the APM server</returns>
        public static List <Stacktrace> GenerateApmStackTrace(StackFrame[] frames, AbstractLogger logger, string capturingFor)
        {
            var retVal = new List <Stacktrace>(frames.Length);

            try
            {
                foreach (var item in frames)
                {
                    var fileName = item?.GetMethod()?.DeclaringType?.Assembly?.GetName()?.Name;
                    if (String.IsNullOrEmpty(fileName))
                    {
                        continue; //since filename is required by the server, if we don't have it we skip the frame
                    }

                    retVal.Add(new Stacktrace
                    {
                        Function = item?.GetMethod()?.Name,
                        Filename = fileName,
                        Module   = item?.GetMethod()?.ReflectedType?.Name
                    });
                }
            }
            catch (Exception e)
            {
                logger.LogWarning($"Failed capturing stacktrace for {capturingFor}");
                logger.LogDebug($"{e.GetType().Name}: {e.Message}");
            }

            return(retVal);
        }
Ejemplo n.º 23
0
 public static void Unfriend(AbstractLogger logger, INotificationQueue notificationQueue, IMixWebCallFactory mixWebCallFactory, string friendSwid, Action successCallback, Action failureCallback)
 {
     try
     {
         RemoveFriendshipRequest removeFriendshipRequest = new RemoveFriendshipRequest();
         removeFriendshipRequest.FriendUserId = friendSwid;
         RemoveFriendshipRequest request = removeFriendshipRequest;
         IWebCall <RemoveFriendshipRequest, RemoveFriendshipResponse> webCall = mixWebCallFactory.FriendshipDeletePost(request);
         webCall.OnResponse += delegate(object sender, WebCallEventArgs <RemoveFriendshipResponse> e)
         {
             RemoveFriendshipResponse     response     = e.Response;
             RemoveFriendshipNotification notification = response.Notification;
             if (NotificationValidator.Validate(notification))
             {
                 notificationQueue.Dispatch(notification, successCallback, failureCallback);
             }
             else
             {
                 logger.Critical("Failed to validate remove friendship response: " + JsonParser.ToJson(response));
                 failureCallback();
             }
         };
         webCall.OnError += delegate
         {
             failureCallback();
         };
         webCall.Execute();
     }
     catch (Exception arg)
     {
         logger.Critical("Unhandled exception: " + arg);
         failureCallback();
     }
 }
Ejemplo n.º 24
0
 public WwwCallFactory(AbstractLogger logger, ICoroutineManager coroutineManager, IStopwatchFactory stopwatchFactory, IWwwFactory wwwFactory)
 {
     this.logger           = logger;
     this.coroutineManager = coroutineManager;
     this.stopwatchFactory = stopwatchFactory;
     this.wwwFactory       = wwwFactory;
 }
Ejemplo n.º 25
0
        public LoggerTest()
        {
            TestHelper.ResetAgentAndEnvVars();

            Apm.Agent.SetLoggerType <TestLogger>();
            logger = Apm.Agent.CreateLogger("Test");
        }
Ejemplo n.º 26
0
        public static void Main(string[] args)
        {
            AbstractLogger loggerChain = getChainOfLoggers();

            loggerChain.logMessage(AbstractLogger.INFO, "This is an information.");
            loggerChain.logMessage(AbstractLogger.DEBUG, "This is an debug level information.");
            loggerChain.logMessage(AbstractLogger.ERROR, "This is an error information.");
        }
Ejemplo n.º 27
0
 public SeleniumWrapper(IWebDriver webDriver, IntPtr mainWindowHandle, BrowserType type, AbstractLogger scr)
 {
     logger = scr;
     this.MainWindowHandle = mainWindowHandle;
     this.webDriver        = webDriver;
     BrowserType           = type;
     webDriver.Manage().Timeouts().AsynchronousJavaScript = new TimeSpan(0, 0, scriptSeconds);
 }
Ejemplo n.º 28
0
    public void Main()
    {
        AbstractLogger loggerChian = GetChainOfLoggers();

        loggerChian.LogMessage(AbstractLogger.Debug, "debug");
        loggerChian.LogMessage(AbstractLogger.Warning, "warning");
        loggerChian.LogMessage(AbstractLogger.Error, "error");
    }
 public static void ValidateChildAccount(AbstractLogger logger, IGuestControllerClient guestControllerClient, string username, string password, Action <IValidateNewAccountResult> callback)
 {
     Send(logger, guestControllerClient, new ValidateRequest
     {
         username = username,
         password = password
     }, callback);
 }
 public static void ValidateAdultAccount(AbstractLogger logger, IGuestControllerClient guestControllerClient, string email, string password, Action <IValidateNewAccountResult> callback)
 {
     Send(logger, guestControllerClient, new ValidateRequest
     {
         email    = email,
         password = password
     }, callback);
 }
Ejemplo n.º 31
0
 internal static HandleRef getCPtr(AbstractLogger obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Ejemplo n.º 32
0
 public static extern void AbstractLogger_director_connect(HandleRef jarg1, AbstractLogger.SwigDelegateAbstractLogger_0 delegate0, AbstractLogger.SwigDelegateAbstractLogger_1 delegate1);