Stetic.ObjectWrapper.GetIndentityObject C# (CSharp) Method

GetIndentityObject() static private method

static private GetIndentityObject ( object ob ) : object
ob object
return object
        static object GetIndentityObject(object ob)
        {
            if (ob is Gtk.Container.ContainerChild) {
                // We handle ContainerChild in a special way here since
                // the Gtk.Container indexer always returns a new ContainerChild
                // instance. We register its wrapper using ContainerChildHashItem
                // to make sure that two different instance of the same ContainerChild
                // can be found equal.
                ContainerChildHashItem p = new ContainerChildHashItem ();
                p.ContainerChild = (Gtk.Container.ContainerChild) ob;
                return p;
            }
            else
                return ob;
        }