예제 #1
0
 /// <summary>
 /// check if CLS type is a fusioned form;
 /// </summary>
 private void CheckForFusionedForm()
 {
     // initalize for non-splittable:
     m_separatedClsType      = m_clsType;
     m_separatedAttrsBuilder = m_compactTypeAttrsBuilder;
     // check for splittable
     if (m_clsType.IsSubclassOf(ReflectionHelper.BoxedValueBaseType))
     {
         AttributeExtCollection attrColl = AttributeExtCollection.
                                           ConvertToAttributeCollection(m_clsType.GetCustomAttributes(true));
         if (!(attrColl.IsInCollection(typeof(RepositoryIDAttribute))))
         {
             // invalid boxed value type
             throw new INTERNAL(890, CompletionStatus.Completed_MayBe);
         }
         String boxedValueRepId = ((RepositoryIDAttribute)attrColl.GetAttributeForType(typeof(RepositoryIDAttribute))).Id;
         try {
             SplitBoxedForm(boxedValueRepId);
         } catch (Exception e) {
             // invalid boxedValueType found: static method missing or not callable: BoxedValueBase.GET_FIRST_NONBOXED_TYPE_METHODNAME
             Trace.WriteLine("problematic boxed val found: " + m_clsType.FullName + "; ex: " + e);
             throw new INTERNAL(890, CompletionStatus.Completed_MayBe);
         }
     }
 }
예제 #2
0
        /// <summary>gets the request method name for attribute, if possible.</summary>
        private static string GetRequestMethodNameFromAttr(MethodInfo info)
        {
            AttributeExtCollection methodAttributes =
                ReflectionHelper.GetCustomAttriutesForMethod(info, true);

            if (methodAttributes.IsInCollection(ReflectionHelper.FromIdlNameAttributeType))
            {
                FromIdlNameAttribute idlNameAttr =
                    (FromIdlNameAttribute)methodAttributes.GetAttributeForType(ReflectionHelper.FromIdlNameAttributeType);
                return(idlNameAttr.IdlName);
            }
            else
            {
                return(null);
            }
        }