Пример #1
0
        public void SetReference(object resource, string propertyName, object propertyValue)
        {
            string          str;
            string          str1;
            IUpdateInstance instanceFromHandle;
            Tracer          current = TraceHelper.Current;
            string          str2    = "DataServiceUpdateProvider";
            string          str3    = "SetReference";

            if (resource == null)
            {
                str = "null";
            }
            else
            {
                str = resource.ToString();
            }
            string str4 = propertyName;

            if (propertyValue == null)
            {
                str1 = "null";
            }
            else
            {
                str1 = propertyValue.ToString();
            }
            current.MethodCall3(str2, str3, str, str4, str1);
            IUpdateInstance updateInstance = this.GetInstanceFromHandle(resource);

            if (propertyValue == null)
            {
                instanceFromHandle = null;
            }
            else
            {
                instanceFromHandle = this.GetInstanceFromHandle(propertyValue);
            }
            IUpdateInstance updateInstance1 = instanceFromHandle;

            updateInstance.SetReference(propertyName, updateInstance1);
        }