GetIdentifier() 공개 추상적인 메소드

public abstract GetIdentifier ( ) : string
리턴 string
예제 #1
0
        public static bool IsBanned(RemoteAddress address)
        {
            try
            {
                string identifier = address.GetIdentifier();
                if (File.Exists(Netplay.BanFilePath))
                {
                    using (StreamReader streamReader = new StreamReader(Netplay.BanFilePath))
                    {
                        string a;
                        while ((a = streamReader.ReadLine()) != null)
                        {
                            if (a == identifier)
                            {
                                return true;
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            #if DEBUG
                Console.WriteLine(ex);
                System.Diagnostics.Debugger.Break();

            #endif
            }
            return false;
        }
예제 #2
0
        public static bool IsBanned(RemoteAddress address)
        {
            try
            {
                string identifier = address.GetIdentifier();
                if (System.IO.File.Exists(Netplay.BanFilePath))
                {
                    using (StreamReader streamReader = new StreamReader(Netplay.BanFilePath))
                    {
                        string str;
                        while ((str = streamReader.ReadLine()) != null)
                        {
                            if (str == identifier)
                                return true;
                        }
                    }
                }
            }
            catch
            {
                return false;
            }

            return false;
        }
		public static bool IsBanned(RemoteAddress address)
		{
			try
			{
				string identifier = address.GetIdentifier();
				if (File.Exists(Netplay.BanFilePath))
				{
					using (StreamReader streamReader = new StreamReader(Netplay.BanFilePath))
					{
						string a;
						while ((a = streamReader.ReadLine()) != null)
						{
							if (a == identifier)
							{
								return true;
							}
						}
					}
				}
			}
			catch (Exception)
			{
			}
			return false;
		}