protected Scop() { Scops = new List <Scop>(); if (GetType() == typeof(MethodInfo)) { SType = EScop.Method; } else { Scops = new List <Scop>(); if (GetType() == typeof(Class)) { SType = EScop.Class; } else if (GetType() == typeof(Namespace)) { SType = EScop.Namespace; } } }
public Scop GetByName(EScop _scop, string name) { return(Scops.FirstOrDefault(scop => scop.Equals(name) && _scop == scop.SType)); }