System.Runtime.InteropServices.RegistrationServices.TypeRequiresRegistration C# (CSharp) Method

TypeRequiresRegistration() private method

private TypeRequiresRegistration ( Type type ) : bool
type System.Type
return bool
		public virtual bool TypeRequiresRegistration (Type type)
		{
			throw new NotImplementedException ();
		}

Usage Example

 public void CheckAssemblySCValidity(Assembly asm)
 {
     Type[] types = null;
     bool flag = true;
     ArrayList list = null;
     RegistrationServices services = new RegistrationServices();
     try
     {
         types = asm.GetTypes();
     }
     catch (ReflectionTypeLoadException exception)
     {
         types = exception.Types;
     }
     foreach (Type type in types)
     {
         if (((null != type) && type.IsClass) && type.IsSubclassOf(typeof(ServicedComponent)))
         {
             if (!services.TypeRequiresRegistration(type) && !type.IsAbstract)
             {
                 flag = false;
                 if (list == null)
                 {
                     list = new ArrayList();
                 }
                 RegistrationErrorInfo info = new RegistrationErrorInfo(null, null, type.ToString(), -2147467259);
                 list.Add(info);
             }
             ClassInterfaceType classInterfaceType = ServicedComponentInfo.GetClassInterfaceType(type);
             foreach (MethodInfo info2 in type.GetMethods())
             {
                 if (ReflectionCache.ConvertToInterfaceMI(info2) == null)
                 {
                     if (ServicedComponentInfo.HasSpecialMethodAttributes(info2))
                     {
                         this.ReportWarning(Resource.FormatString("Reg_NoClassInterfaceSecure", type.FullName, info2.Name));
                     }
                     if ((classInterfaceType == ClassInterfaceType.AutoDispatch) && ServicedComponentInfo.IsMethodAutoDone(info2))
                     {
                         this.ReportWarning(Resource.FormatString("Reg_NoClassInterface", type.FullName, info2.Name));
                     }
                 }
             }
         }
     }
     if (!flag)
     {
         RegistrationErrorInfo[] errorInfo = (RegistrationErrorInfo[]) list.ToArray(typeof(RegistrationErrorInfo));
         throw new RegistrationException(Resource.FormatString("Reg_InvalidServicedComponents"), errorInfo);
     }
 }
All Usage Examples Of System.Runtime.InteropServices.RegistrationServices::TypeRequiresRegistration