-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove (int) Cast in Attributes #2
Comments
@abilson, this one has been chasing us for quite some time BIGly and we have not been able to run away from it, at least not in the form it is right now. The reason we do the casts is because under the hood we consider more integer values for conversion. We have two more types of properties. Here is a sample from SqlDao conversion, where we define property for FieldTypeByteArray and FieldTypeCustomListInt:
The solution here is to get rid of the RdoFieldType and define a Gravity-specific enum, yes, or to override it somehow to only contain enums and not have to cast. We just haven't had the time to do this, but I will tag it down on our progress pipeline to be implemented soon. |
The FieldType enum is implemented multiple times, e.g. Relativity.Services, RSAPI. We're going to have to create our own local version - which we already have in |
This is minor, but it's a pain to cast enums in the attributes. Could we simply change the attribute definition to accept the enum instead of int?
Attribute Definition Before:
public RelativityObjectFieldAttribute(string fieldGuid, int fieldType)
Attribute Definition After:
public RelativityObjectFieldAttribute(string fieldGuid, Gravity.Base.RdoFieldType fieldType)
Attribute Implementation Before:
[RelativityObjectField(guidString, (int)RdoFieldType.FixedLengthText, length)]
Attribute Implementation After:
[RelativityObjectField(guidString, RdoFieldType.FixedLengthText, length)]
The text was updated successfully, but these errors were encountered: