public GenerateUnityEventFunctionsProvider(UnityApi unityApi, UnityVersion unityVersion, KnownTypesCache knownTypesCache) { myUnityApi = unityApi; myUnityVersion = unityVersion; myKnownTypesCache = knownTypesCache; }
public DrawGizmoAttributeProblemAnalyzer([NotNull] UnityApi unityApi, IPredefinedTypeCache predefinedTypeCache, KnownTypesCache knownTypesCache) : base(unityApi) { myPredefinedTypeCache = predefinedTypeCache; myKnownTypesCache = knownTypesCache; }
public AttributedMethodSignatureProblemAnalyzer(UnityApi unityApi, IPredefinedTypeCache predefinedTypeCache, KnownTypesCache knownTypesCache) : base(unityApi) { myPredefinedTypeCache = predefinedTypeCache; myKnownTypesCache = knownTypesCache; myMethodSignatures = new ConcurrentDictionary <IClrTypeName, MethodSignature[]>(); }
public FormerlySerializedAsAtomicRename(IDeclaredElement declaredElement, string newName, ISettingsStore settingsStore, KnownTypesCache knownTypesCache) { myKnownTypesCache = knownTypesCache; myModel = new SerializedFieldRenameModel(settingsStore); myPointer = declaredElement.CreateElementPointer(); OldName = declaredElement.ShortName; NewName = newName; }
private static bool HasDifferentParameterLists( [NotNull] UnityEventFunction function, [NotNull] CSharpCodeCompletionContext context, [NotNull] KnownTypesCache knownTypesCache) { var unterminatedContext = context.UnterminatedContext; var methodDeclaration = unterminatedContext.TreeNode?.GetContainingNode <IMethodDeclaration>(); if (methodDeclaration == null) { return(false); } var functionParameters = function.Parameters; var currentMethodParameters = methodDeclaration.Params; if (currentMethodParameters == null) { return(false); } if (functionParameters.Length != currentMethodParameters.ParameterDeclarations.Count) { return(true); } var typeConversionRule = currentMethodParameters.GetTypeConversionRule(); var module = methodDeclaration.GetPsiModule(); for (var paramIndex = 0; paramIndex < functionParameters.Length; paramIndex++) { var functionParameter = functionParameters[paramIndex]; var currentMethodParameter = currentMethodParameters.ParameterDeclarations[paramIndex]; var conversion = typeConversionRule.ClassifyImplicitConversion(currentMethodParameter.Type, functionParameter.TypeSpec.AsIType(knownTypesCache, module)); if (conversion.Kind != ConversionKind.Identity) { return(true); } } return(false); }
public UnityEventFunctionAnalyzer(UnityApi unityApi, KnownTypesCache knownTypesCache) : base(unityApi) { myKnownTypesCache = knownTypesCache; }