j'aimerai savoir s'il y a un moyen de générer un idl à partir d'une classe (pour mon cas en c#) contenant des générics.
Par exemple, voici l'interface d'une telle classe :
Code :
namespace MesTests
{
public interface ITestIdl
{
List<string> GetStringList();
List<AutreClass> GetMesObjets();
}
Pour l'instant, l'utilisation de CLSIDLGenerator.exe pour générer l'idl d'une telle classe me donne les erreurs suivantes:
error while running generator: System.ArgumentNullException: La référence de chaîne n'est pas définie à une instance d'une chaîne. à System.Reflection.Module.InternalGetStringConstant(String str) à System.Reflection.Emit.ModuleBuilder.GetStringConstant(String str) à System.Reflection.Emit.ILGenerator.Emit(OpCode opcode, String str) à Ch.Elca.Iiop.Idl.BoxedValueTypeGenerator.DefineGetFirstNonBoxedTypeName(TypeBuilder boxBuilder, Type fullUnboxed) à Ch.Elca.Iiop.Idl.BoxedValueTypeGenerator.DefineBoxedTypeForCLSArray(TypeBuilder boxBuilder, Type arrayType, BoxedValueRuntimeTypeGenerator gen) à Ch.Elca.Iiop.Idl.BoxedValueRuntimeTypeGenerator.GetOrCreateBoxedTypeForArray(Type arrayType) à Ch.Elca.Iiop.Idl.ClsToIdlMapper.GetBoxedArrayType(Type clsArrayType) à Ch.Elca.Iiop.Idl.ClsToIdlMapper.CallActionForDNArray(Type& clsType, AttributeExtCollection& modifiedAttributes, AttributeExtCollection allAttribu tes, MappingAction action) à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsTypeWithTransform(Type& clsType, AttributeExtCollection& attributes, MappingAction action, CustomMappingDes c& usedCustomMapping) à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsType(Type clsType, AttributeExtCollection attributes, MappingAction action) à Ch.Elca.Iiop.Idl.ClsToIdlMapper.IsMappedToConcreteValueType(Type clsType, AttributeExtCollection attributes) à Ch.Elca.Iiop.Idl.ClsToIdlMapper.IsMappedToConcreteValueType(Type clsType) à Ch.Elca.Iiop.Idl.DependencyManager.IsForwardDeclPossible(Type forType, AttributeExtCollection attributes) à Ch.Elca.Iiop.Idl.DependencyInformation.DetermineContentDependenciesFromMethods() à Ch.Elca.Iiop.Idl.DependencyInformation.DetermineContentDependencies(AttributeExtCollection attributesAfterMap) à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.BeginTypeWithName(Type dotNetType, AttributeExtCollection attributes, AttributeExtCollection attribu tesAfterMap, String[] modules, String unqualName) à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.MapToIdlConcreateValueType(Type clsType) à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsTypeWithTransform(Type& clsType, AttributeExtCollection& attributes, MappingAction action, CustomMappingDes c& usedCustomMapping) à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsType(Type clsType, AttributeExtCollection attributes, MappingAction action) à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.MapTypes(IList typesToMap) à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.EndType() à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.MapToIdlConcreateValueType(Type clsType) à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsTypeWithTransform(Type& clsType, AttributeExtCollection& attributes, MappingAction action, CustomMappingDes c& usedCustomMapping) à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsType(Type clsType, AttributeExtCollection attributes, MappingAction action) à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.MapTypes(IList typesToMap) à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.EndType() à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.MapToIdlAbstractInterface(Type clsType) à Ch.Elca.Iiop.Idl.ClsToIdlMapper.CallActionForDNInterface(Type& clsType, MappingAction action) à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsTypeWithTransform(Type& clsType, AttributeExtCollection& attributes, MappingAction action, CustomMappingDes c& usedCustomMapping) à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsType(Type clsType, AttributeExtCollection attributes, MappingAction action) à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.MapTypes(IList typesToMap) à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.BeforeTypeDefinition() à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.BeginTypeWithName(Type dotNetType, AttributeExtCollection attributes, AttributeExtCollection attribu tesAfterMap, String[] modules, String unqualName) à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.MapToIdlConcreteInterface(Type clsType) à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsTypeWithTransform(Type& clsType, AttributeExtCollection& attributes, MappingAction action, CustomMappingDes c& usedCustomMapping) à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsType(Type clsType, AttributeExtCollection attributes, MappingAction action) à Ch.Elca.Iiop.Idl.IdlGenerator.Main(String[] args)
Cela m'ennuit de virer tous mes generics. Please, help me !!!
Marsh Posté le 02-04-2007 à 11:30:08
Bonjour à tous,
j'aimerai savoir s'il y a un moyen de générer un idl à partir d'une classe (pour mon cas en c#) contenant des générics.
Par exemple, voici l'interface d'une telle classe :
Pour l'instant, l'utilisation de CLSIDLGenerator.exe pour générer l'idl d'une telle classe me donne les erreurs suivantes:
error while running generator: System.ArgumentNullException: La référence de chaîne n'est pas définie à une instance d'une chaîne.
à System.Reflection.Module.InternalGetStringConstant(String str)
à System.Reflection.Emit.ModuleBuilder.GetStringConstant(String str)
à System.Reflection.Emit.ILGenerator.Emit(OpCode opcode, String str)
à Ch.Elca.Iiop.Idl.BoxedValueTypeGenerator.DefineGetFirstNonBoxedTypeName(TypeBuilder boxBuilder, Type fullUnboxed)
à Ch.Elca.Iiop.Idl.BoxedValueTypeGenerator.DefineBoxedTypeForCLSArray(TypeBuilder boxBuilder, Type arrayType, BoxedValueRuntimeTypeGenerator gen)
à Ch.Elca.Iiop.Idl.BoxedValueRuntimeTypeGenerator.GetOrCreateBoxedTypeForArray(Type arrayType)
à Ch.Elca.Iiop.Idl.ClsToIdlMapper.GetBoxedArrayType(Type clsArrayType)
à Ch.Elca.Iiop.Idl.ClsToIdlMapper.CallActionForDNArray(Type& clsType, AttributeExtCollection& modifiedAttributes, AttributeExtCollection allAttribu
tes, MappingAction action)
à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsTypeWithTransform(Type& clsType, AttributeExtCollection& attributes, MappingAction action, CustomMappingDes
c& usedCustomMapping)
à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsType(Type clsType, AttributeExtCollection attributes, MappingAction action)
à Ch.Elca.Iiop.Idl.ClsToIdlMapper.IsMappedToConcreteValueType(Type clsType, AttributeExtCollection attributes)
à Ch.Elca.Iiop.Idl.ClsToIdlMapper.IsMappedToConcreteValueType(Type clsType)
à Ch.Elca.Iiop.Idl.DependencyManager.IsForwardDeclPossible(Type forType, AttributeExtCollection attributes)
à Ch.Elca.Iiop.Idl.DependencyInformation.DetermineContentDependenciesFromMethods()
à Ch.Elca.Iiop.Idl.DependencyInformation.DetermineContentDependencies(AttributeExtCollection attributesAfterMap)
à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.BeginTypeWithName(Type dotNetType, AttributeExtCollection attributes, AttributeExtCollection attribu
tesAfterMap, String[] modules, String unqualName)
à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.MapToIdlConcreateValueType(Type clsType)
à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsTypeWithTransform(Type& clsType, AttributeExtCollection& attributes, MappingAction action, CustomMappingDes
c& usedCustomMapping)
à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsType(Type clsType, AttributeExtCollection attributes, MappingAction action)
à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.MapTypes(IList typesToMap)
à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.EndType()
à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.MapToIdlConcreateValueType(Type clsType)
à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsTypeWithTransform(Type& clsType, AttributeExtCollection& attributes, MappingAction action, CustomMappingDes
c& usedCustomMapping)
à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsType(Type clsType, AttributeExtCollection attributes, MappingAction action)
à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.MapTypes(IList typesToMap)
à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.EndType()
à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.MapToIdlAbstractInterface(Type clsType)
à Ch.Elca.Iiop.Idl.ClsToIdlMapper.CallActionForDNInterface(Type& clsType, MappingAction action)
à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsTypeWithTransform(Type& clsType, AttributeExtCollection& attributes, MappingAction action, CustomMappingDes
c& usedCustomMapping)
à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsType(Type clsType, AttributeExtCollection attributes, MappingAction action)
à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.MapTypes(IList typesToMap)
à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.BeforeTypeDefinition()
à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.BeginTypeWithName(Type dotNetType, AttributeExtCollection attributes, AttributeExtCollection attribu
tesAfterMap, String[] modules, String unqualName)
à Ch.Elca.Iiop.Idl.GenerationActionDefineTypes.MapToIdlConcreteInterface(Type clsType)
à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsTypeWithTransform(Type& clsType, AttributeExtCollection& attributes, MappingAction action, CustomMappingDes
c& usedCustomMapping)
à Ch.Elca.Iiop.Idl.ClsToIdlMapper.MapClsType(Type clsType, AttributeExtCollection attributes, MappingAction action)
à Ch.Elca.Iiop.Idl.IdlGenerator.Main(String[] args)
Cela m'ennuit de virer tous mes generics.
Please, help me !!!
merci