ThreePointZero.Areas.HelpPage.ObjectGenerator.SetPublicFields C# (CSharp) Метод

SetPublicFields() приватный статический Метод

private static SetPublicFields ( Type type, object obj, object>.Dictionary createdObjectReferences ) : void
type System.Type
obj object
createdObjectReferences object>.Dictionary
Результат void
        private static void SetPublicFields(Type type, object obj, Dictionary<Type, object> createdObjectReferences)
        {
            FieldInfo[] fields = type.GetFields(BindingFlags.Public | BindingFlags.Instance);
            ObjectGenerator objectGenerator = new ObjectGenerator();
            foreach (FieldInfo field in fields)
            {
                object fieldValue = objectGenerator.GenerateObject(field.FieldType, createdObjectReferences);
                field.SetValue(obj, fieldValue);
            }
        }