예제 #1
0
        public static DefinitionSite CreateUnknownDefinitionSite()
        {
            var definitionSite = new DefinitionSite
            {
                kind = DefinitionSiteKind.UNKNOWN,
            };

            return(definitionSite);
        }
예제 #2
0
        public static DefinitionSite CreateDefinitionByConstructor(string constructor)
        {
            var definitionSite = new DefinitionSite
            {
                kind   = DefinitionSiteKind.NEW,
                method = new CoReMethodName(constructor)
            };

            return(definitionSite);
        }
예제 #3
0
        public static DefinitionSite CreateDefinitionByField(IFieldName field)
        {
            var definitionSite = new DefinitionSite
            {
                kind  = DefinitionSiteKind.FIELD,
                field = field.ToCoReName()
            };

            return(definitionSite);
        }
예제 #4
0
        public static DefinitionSite CreateDefinitionByField(string field)
        {
            var definitionSite = new DefinitionSite
            {
                kind  = DefinitionSiteKind.FIELD,
                field = new CoReFieldName(field)
            };

            return(definitionSite);
        }
예제 #5
0
        public static DefinitionSite CreateDefinitionByReturn(IMethodName methodName)
        {
            var definitionSite = new DefinitionSite
            {
                kind   = DefinitionSiteKind.RETURN,
                method = methodName.ToCoReName()
            };

            return(definitionSite);
        }
예제 #6
0
        public static DefinitionSite CreateDefinitionByReturn(string methodName)
        {
            var definitionSite = new DefinitionSite
            {
                kind   = DefinitionSiteKind.RETURN,
                method = new CoReMethodName(methodName)
            };

            return(definitionSite);
        }
예제 #7
0
        public static DefinitionSite CreateDefinitionByParam(IMethodName methodName, int argIndex)
        {
            var definitionSite = new DefinitionSite
            {
                kind     = DefinitionSiteKind.PARAM,
                method   = methodName.ToCoReName(),
                argIndex = argIndex
            };

            return(definitionSite);
        }
예제 #8
0
        public static DefinitionSite CreateDefinitionByParam(string methodName, int argIndex)
        {
            var definitionSite = new DefinitionSite
            {
                kind     = DefinitionSiteKind.PARAM,
                method   = new CoReMethodName(methodName),
                argIndex = argIndex
            };

            return(definitionSite);
        }
예제 #9
0
 private bool Equals(DefinitionSite oth)
 {
     return(kind.Equals(oth.kind) && argIndex == oth.argIndex && Equals(method, oth.method) &&
            Equals(field, oth.field));
 }