InternalSetValue() public static méthode

public static InternalSetValue ( Mobile from, object logobj, object o, PropertyInfo p, string pname, string value, bool shouldLog ) : string
from Mobile
logobj object
o object
p System.Reflection.PropertyInfo
pname string
value string
shouldLog bool
Résultat string
Exemple #1
0
        public static IEntity Build(
            Mobile from, ConstructorInfo ctor, object[] values, string[,] props,
            PropertyInfo[] realProps, ref bool sendError
            )
        {
            var built = ctor.Invoke(values);

            if (realProps != null)
            {
                var hadError = false;

                for (var i = 0; i < realProps.Length; ++i)
                {
                    if (realProps[i] == null)
                    {
                        continue;
                    }

                    var result =
                        Properties.InternalSetValue(from, built, built, realProps[i], props[i, 1], props[i, 1], false);

                    if (result != "Property has been set.")
                    {
                        if (sendError)
                        {
                            from.SendMessage(result);
                        }

                        hadError = true;
                    }
                }

                if (hadError)
                {
                    sendError = false;
                }
            }

            return((IEntity)built);
        }