コード例 #1
0
        private void ProcessHookAttribute(BindingSourceMethod bindingSourceMethod, BindingScope[] methodScopes, BindingSourceAttribute hookAttribute)
        {
            var scopes = methodScopes.AsEnumerable();

            // HACK: Currently on mono to compile we have to pass the optional parameter to TryGetParamsAttributeValue
            string[] tags = hookAttribute.TryGetParamsAttributeValue <string>(0, null);
            if (tags != null)
            {
                scopes = scopes.Concat(tags.Select(t => new BindingScope(t, null, null)));
            }

            ApplyForScope(scopes.ToArray(), scope => ProcessHookAttribute(bindingSourceMethod, hookAttribute, scope));
        }
コード例 #2
0
 private static string[] TagsFromConstructor(BindingSourceAttribute hookAttribute)
 {
     // HACK: Currently on mono to compile we have to pass the optional parameter to TryGetParamsAttributeValue
     return(hookAttribute.TryGetParamsAttributeValue <string>(0, null));
 }