LogWarning() публичный статический Метод

public static LogWarning ( string message ) : void
message string
Результат void
Пример #1
0
        public void AddTimer(string name, float start, float delay, bool loop, EventHandler callback, object param = null)
        {
            if (callback == null)
            {
                DebugUtils.LogWarning("AddTimer - '{0}' timer's callback is null.", name);
                return;
            }

            if (pending_list_.ContainsKey(name))
            {
                DebugUtils.LogWarning("AddTimer - '{0}' timer already exists.", name);
                return;
            }

            if (timer_list_.ContainsKey(name))
            {
                if (!is_all_clear_ && !remove_list_.Contains(name))
                {
                    DebugUtils.LogWarning("AddTimer - '{0}' timer already exists.", name);
                    return;
                }
            }

            pending_list_.Add(name, new Event(name, start, delay, loop, callback, param));
            DebugUtils.DebugLog("AddTimer - '{0}' timer added.", name);
        }
Пример #2
0
        public override Int64 Decrypt(ArraySegment <byte> src, ArraySegment <byte> dst, string in_header)
        {
            DebugUtils.Assert(state == State.kEstablished);

            if (in_header.Length > 0)
            {
                DebugUtils.LogWarning("Wrong encryptor header.");
                return(-1);
            }

            return(Encrypt(src, dst, false));
        }
Пример #3
0
        public override Int64 Decrypt(ArraySegment <byte> src, ArraySegment <byte> dst, string in_header)
        {
            if (in_header.Length > 0)
            {
                DebugUtils.LogWarning("Wrong encryptor header.");
                return(-1);
            }

            string out_header = "";

            return(Encrypt(src, dst, ref out_header));
        }
Пример #4
0
        public void GetDownloadList(string url, string target_path)
        {
            if (ReadyCallback == null)
            {
                DebugUtils.LogError("You must register the ReadyCallback first.");
                return;
            }

            mutex_.WaitOne();

            try
            {
                if (IsDownloading)
                {
                    DebugUtils.LogWarning("The resource file is being downloaded. (Url: {0})\n"
                                          + "Please try again after the download is completed.", url);
                    return;
                }

                state_ = State.Start;

                string host_url = url;
                if (host_url[host_url.Length - 1] != '/')
                {
                    host_url += "/";
                }
                host_url_ = host_url;

                target_path_ = target_path;
                if (target_path_[target_path_.Length - 1] != '/')
                {
                    target_path_ += "/";
                }
                target_path_ += kRootPath + "/";
                DebugUtils.Log("Download path:{0}", target_path_);

                cur_download_count_   = 0;
                cur_download_size_    = 0;
                total_download_count_ = 0;
                total_download_size_  = 0;

                LoadCachedList();

                // Gets list file
                DownloadListFile(host_url_);
            }
            finally
            {
                mutex_.ReleaseMutex();
            }
        }
        // start: index at which the range starts.
        public void RequestFriendPictures(int start, int count)
        {
            if (friends_.Count <= 0)
            {
                DebugUtils.LogWarning("There's no friend list. You should call 'RequestFriendList' first.");
                return;
            }

            List <UserInfo> list = GetRangeOfList(friends_, start, count);

            if (list == null)
            {
                DebugUtils.LogWarning("Invalid range of friend list. list:{0} start:{1} count:{2}",
                                      friends_.Count, start, count);
                return;
            }

            StartCoroutine(RequestPictureList(list));
        }
Пример #6
0
        public static Encryptor Create(string name)
        {
            if (name == Encryptor0.kName)
            {
                return(new Encryptor0());
            }
            else if (name == Encryptor1.kName)
            {
                return(new Encryptor1());
            }
            else if (name == Encryptor2.kName)
            {
                return(new Encryptor2());
            }

            DebugUtils.LogWarning("Unknown encryptor: {0}", name);
            DebugUtils.Assert(false);

            return(null);
        }
Пример #7
0
        public static Encryptor Create(EncryptionType type)
        {
            if (type == EncryptionType.kDummyEncryption)
            {
                return(new Encryptor0());
            }
            else if (type == EncryptionType.kIFunEngine1Encryption)
            {
                return(new Encryptor1());
            }
            else if (type == EncryptionType.kIFunEngine2Encryption)
            {
                return(new Encryptor2());
            }

            DebugUtils.LogWarning("Unknown encryptor: {0}", type);
            DebugUtils.Assert(false);

            return(null);
        }