Exemplo n.º 1
0
        public string Scenery(int _C, int _S)
        {
            c = _C;
            s = _S;

            List_scenes ls = new List_scenes();
            string      S  = ls.Getscene(s);



            Reader text = new Reader(S);

            Sep sep = new Sep();


            done = text.text();
            done = sep.separar(c, done, '#');


            if (done == "")
            {
                done = "...";
            }

            Check ch = new Check(done);

            special = ch.special();


            return(done);
        }
Exemplo n.º 2
0
        public static Either <Exception, ProcessId> TryParse(string path)
        {
            if (path == null || path.Length == 0)
            {
                return(new InvalidProcessIdException());
            }
            if (path[0] == '@')
            {
                return(ParseRegisteredProcess(path.Substring(1)));
            }

            if (path[0] != Sep)
            {
                return(new InvalidProcessIdException());
            }

            ProcessName[] parts = null;
            ProcessName   name;
            string        finalPath = null;

            if (path.Length == 1)
            {
                parts = new ProcessName[0];
            }
            else
            {
                try
                {
                    parts = SplitOnSep(path).ToArray();
                }
                catch (InvalidProcessNameException)
                {
                    return(new InvalidProcessIdException());
                }
            }

            finalPath = parts == null
                ? ""
                : parts.Length == 0
                    ? Sep.ToString()
                    : Sep + String.Join(Sep.ToString(), parts);

            if (path != Sep.ToString())
            {
                name = parts == null
                    ? ""
                    : parts.Length == 0
                        ? Sep.ToString()
                        : parts.Last();
            }
            else
            {
                name = "$";
            }

            return(new ProcessId(parts, name, finalPath));
        }
        public string GetScoresString()
        {
            string scoresString = "";

            foreach (var score in ScoresList)
            {
                scoresString += Sep.ToString() + score.ToString();
            }
            return(scoresString);
        }
Exemplo n.º 4
0
        public ProcessId(string path)
        {
            if (path == null || path.Length == 0)
            {
                throw new InvalidProcessIdException();
            }
            if (path[0] == '@')
            {
                var regd = ParseRegisteredProcess(path.Substring(1));
                parts = regd.parts;
                name  = regd.name;
                Path  = regd.Path;
                return;
            }

            if (path[0] != Sep)
            {
                throw new InvalidProcessIdException();
            }
            if (path.Length == 1)
            {
                parts = new ProcessName[0];
            }
            else
            {
                try
                {
                    parts = SplitOnSep(path).ToArray();
                }
                catch (InvalidProcessNameException)
                {
                    throw new InvalidProcessIdException();
                }
            }

            Path = parts == null
                ? ""
                : parts.Length == 0
                    ? Sep.ToString()
                    : Sep + String.Join(Sep.ToString(), parts);

            if (path != Sep.ToString())
            {
                name = parts == null
                    ? ""
                    : parts.Length == 0
                        ? Sep.ToString()
                        : parts.Last();
            }
            else
            {
                name = "$";
            }
        }
Exemplo n.º 5
0
        public ProcessId(string path)
        {
            if (path == null || path.Length == 0)
            {
                throw new InvalidProcessIdException();
            }
            if (path[0] != Sep)
            {
                throw new InvalidProcessIdException();
            }
            if (path.Length == 1)
            {
                parts = new ProcessName[0];
            }
            else
            {
                try
                {
                    parts = path.Substring(1)
                            .Split(Sep)
                            .Select(p => new ProcessName(p))
                            .ToArray();
                }
                catch (InvalidProcessNameException)
                {
                    throw new InvalidProcessIdException();
                }
            }

            Path = parts == null
                ? ""
                : parts.Length == 0
                    ? Sep.ToString()
                    : Sep + String.Join(Sep.ToString(), parts);

            if (path != Sep.ToString())
            {
                name = parts == null
                    ? ""
                    : parts.Length == 0
                        ? Sep.ToString()
                        : parts.Last();
            }
            else
            {
                name = "$";
            }
        }
Exemplo n.º 6
0
        public static Either <Exception, ProcessId> TryParse(string path)
        {
            if (path == null || path.Length == 0)
            {
                return(new InvalidProcessIdException());
            }

            var system = "";

            if (path.StartsWith("//"))
            {
                var end = path.IndexOf('/', 2);
                end = end == -1
                    ? path.IndexOf("@", 2)
                    : end;

                if (end == -1)
                {
                    return(new InvalidProcessIdException($"Invalid ProcessId ({path}), nothing following the system specifier"));
                }

                system = path.Substring(2, end - 2);
                path   = path.Substring(end);
            }

            if (path[0] == '@')
            {
                return(ParseRegisteredProcess(path.Substring(1)));
            }

            if (path[0] != Sep)
            {
                return(new InvalidProcessIdException());
            }

            ProcessName[] parts = null;
            ProcessName   name;
            string        finalPath = null;

            if (path.Length == 1)
            {
                parts = new ProcessName[0];
            }
            else
            {
                try
                {
                    parts = SplitOnSep(path).ToArray();
                }
                catch (InvalidProcessNameException)
                {
                    return(new InvalidProcessIdException());
                }
            }

            finalPath = parts == null
                ? ""
                : parts.Length == 0
                    ? Sep.ToString()
                    : Sep + String.Join(Sep.ToString(), parts);

            if (path != Sep.ToString())
            {
                name = parts == null
                    ? ""
                    : parts.Length == 0
                        ? Sep.ToString()
                        : parts.Last();
            }
            else
            {
                name = "$";
            }

            return(new ProcessId(parts, system == "" ? default(SystemName) : system, name, finalPath));
        }
Exemplo n.º 7
0
 public static char CharFromSep(Sep sep)
 {
     return(mpsepch[(int)sep]);
 }
 public string Output()
 {
     return(string.Join(Sep.ToString(), GetLine()));
 }
Exemplo n.º 9
0
    public override int GetHashCode()
    {
        int hash = 1;

        if (Id.Length != 0)
        {
            hash ^= Id.GetHashCode();
        }
        if (AgeYears != 0)
        {
            hash ^= AgeYears.GetHashCode();
        }
        if (AgeDays != 0)
        {
            hash ^= AgeDays.GetHashCode();
        }
        if (BirthDate != 0)
        {
            hash ^= BirthDate.GetHashCode();
        }
        if (AdmDate != 0)
        {
            hash ^= AdmDate.GetHashCode();
        }
        if (SepDate != 0)
        {
            hash ^= SepDate.GetHashCode();
        }
        if (LeaveDays != 0)
        {
            hash ^= LeaveDays.GetHashCode();
        }
        if (Sex.Length != 0)
        {
            hash ^= Sex.GetHashCode();
        }
        if (Adm.Length != 0)
        {
            hash ^= Adm.GetHashCode();
        }
        if (Sep.Length != 0)
        {
            hash ^= Sep.GetHashCode();
        }
        if (Gestage != 0)
        {
            hash ^= Gestage.GetHashCode();
        }
        if (Los != 0)
        {
            hash ^= Los.GetHashCode();
        }
        if (Hmv != 0)
        {
            hash ^= Hmv.GetHashCode();
        }
        if (Bh != false)
        {
            hash ^= Bh.GetHashCode();
        }
        hash ^= diagnoses_.GetHashCode();
        hash ^= procedures_.GetHashCode();
        if (_unknownFields != null)
        {
            hash ^= _unknownFields.GetHashCode();
        }
        return(hash);
    }
Exemplo n.º 10
0
 public override int GetHashCode()
 {
     return(DetailsId.GetHashCode() ^ DetailsName.GetHashCode() ^ Jan.GetHashCode() ^ Feb.GetHashCode() ^ Apr.GetHashCode() ^ May.GetHashCode() ^ Jun.GetHashCode() ^ Jul.GetHashCode() ^ Aug.GetHashCode() ^ Sep.GetHashCode() ^ Oct.GetHashCode() ^ Nov.GetHashCode()
            ^ Dec.GetHashCode() ^ UOM.GetHashCode() ^ UOMID.GetHashCode());
 }
Exemplo n.º 11
0
 static public void Error(Exception e, string message, Sep s = null, [CallerMemberName] string caller = "", [CallerFilePath] string file = "")
 {
     NLog.LogManager.GetLogger(caller).Error(e, message);
 }
Exemplo n.º 12
0
 static public void Info(string message, int arg1, int arg2, Sep s = null, [CallerMemberName] string caller = "", [CallerFilePath] string file = "")
 {
     NLog.LogManager.GetLogger(caller).Info(message, arg1.ToString(), arg2.ToString());
 }
Exemplo n.º 13
0
 static public void Info(string message, Sep s = null, [CallerMemberName] string caller = "", [CallerFilePath] string file = "")
 {
     NLog.LogManager.GetLogger(caller).Info(message);
 }