IKVM.Internal.ClassFile.Field.DecodePropertyAnnotation C# (CSharp) Method

DecodePropertyAnnotation() private method

private DecodePropertyAnnotation ( ClassFile classFile, object annot ) : void
classFile ClassFile
annot object
return void
            private void DecodePropertyAnnotation(ClassFile classFile, object[] annot)
            {
                if(propertyGetterSetter != null)
                {
                    Tracer.Error(Tracer.ClassLoading, "Ignoring duplicate ikvm.lang.Property annotation on {0}.{1}", classFile.Name, this.Name);
                    return;
                }
                propertyGetterSetter = new string[2];
                for(int i = 2; i < annot.Length - 1; i += 2)
                {
                    string value = annot[i + 1] as string;
                    if(value == null)
                    {
                        propertyGetterSetter = null;
                        break;
                    }
                    if(annot[i].Equals("get") && propertyGetterSetter[0] == null)
                    {
                        propertyGetterSetter[0] = value;
                    }
                    else if(annot[i].Equals("set") && propertyGetterSetter[1] == null)
                    {
                        propertyGetterSetter[1] = value;
                    }
                    else
                    {
                        propertyGetterSetter = null;
                        break;
                    }
                }
                if(propertyGetterSetter == null || propertyGetterSetter[0] == null)
                {
                    propertyGetterSetter = null;
                    Tracer.Error(Tracer.ClassLoading, "Ignoring malformed ikvm.lang.Property annotation on {0}.{1}", classFile.Name, this.Name);
                    return;
                }
            }