private string GetTypeNameForField()
        {
            var    typeParts = _serializedTypeRef.TypeNameAndAssembly.Split(',');
            string typeName  = typeParts[0].Trim();

            if (typeName == string.Empty)
            {
                typeName = ClassTypeReference.NoneElement;
            }
            else if (CachedTypeReference.GetType(_serializedTypeRef.TypeNameAndAssembly) == null)
            {
                _serializedTypeRef.TryUpdatingTypeUsingGUID();

                if (CachedTypeReference.GetType(_serializedTypeRef.TypeNameAndAssembly) == null)
                {
                    typeName += MissingSuffix;
                }
            }

            return(typeName);
        }
Example #2
0
 public TypeDropDownDrawer(string typeName, ClassTypeConstraintAttribute constraints, Type declaringType)
 {
     _selectedType  = CachedTypeReference.GetType(typeName);
     _constraints   = constraints;
     _declaringType = declaringType;
 }