/*
 *  MIT License
 *
 *  Copyright (c) 2021 MASES s.r.l.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 *  copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

/**************************************************************************************
 * <auto-generated>
 *      This code was generated from a template using JCOReflector
 * 
 *      Manual changes to this file may cause unexpected behavior in your application.
 *      Manual changes to this file will be overwritten if the code is regenerated.
 * </auto-generated>
 *************************************************************************************/

package system.componentmodel;

import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;

// Import section
import system.collections.IList;
import system.collections.IListImplementation;
import system.collections.ICollection;
import system.collections.ICollectionImplementation;
import system.componentmodel.PropertyDescriptor;
import system.componentmodel.ListSortDirection;
import system.Array;
import system.componentmodel.ListChangedEventHandler;


/**
 * The base .NET class managing System.ComponentModel.IBindingList, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
 * <p>
 * 
 * See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.ComponentModel.IBindingList" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.ComponentModel.IBindingList</a>
 */
public interface IBindingList extends IJCOBridgeReflected, IList, ICollection, IEnumerable {
    /**
     * Fully assembly qualified name: System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
     */
    public static final String assemblyFullName = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
    /**
     * Assembly name: System
     */
    public static final String assemblyShortName = "System";
    /**
     * Qualified class name: System.ComponentModel.IBindingList
     */
    public static final String className = "System.ComponentModel.IBindingList";
    /**
     * Try to cast the {@link IJCOBridgeReflected} instance into {@link IBindingList}, a cast assert is made to check if types are compatible.
     * @param from {@link IJCOBridgeReflected} instance to be casted
     * @return {@link IBindingList} instance
     * @throws java.lang.Throwable in case of error during cast operation
     */
    public static IBindingList ToIBindingList(IJCOBridgeReflected from) throws Throwable {
        JCOBridge bridge = JCOBridgeInstance.getInstance("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
        JCType classType = bridge.GetType(className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName));
        NetType.AssertCast(classType, from);
        return new IBindingListImplementation(from.getJCOInstance());
    }

    /**
     * Returns the reflected Assembly name
     * 
     * @return A {@link String} representing the Fullname of reflected Assembly
     */
    public String getJCOAssemblyName();

    /**
     * Returns the reflected Class name
     * 
     * @return A {@link String} representing the Fullname of reflected Class
     */
    public String getJCOClassName();

    /**
     * Returns the reflected Class name used to build the object
     * 
     * @return A {@link String} representing the name used to allocated the object
     *         in CLR context
     */
    public String getJCOObjectName();

    /**
     * Returns the instantiated class
     * 
     * @return An {@link java.lang.Object} representing the instance of the instantiated Class
     */
    public java.lang.Object getJCOInstance();

    /**
     * Returns the instantiated class Type
     * 
     * @return A {@link JCType} representing the Type of the instantiated Class
     */
    public JCType getJCOType();

    // Methods section
    


    public int Find(PropertyDescriptor property, NetObject key) throws Throwable;


    public NetObject AddNew() throws Throwable;

    public void AddIndex(PropertyDescriptor property) throws Throwable;

    public void ApplySort(PropertyDescriptor property, ListSortDirection direction) throws Throwable;






    public void RemoveIndex(PropertyDescriptor property) throws Throwable;

    public void RemoveSort() throws Throwable;


    
    // Properties section
    
    public boolean getAllowEdit() throws Throwable;

    public boolean getAllowNew() throws Throwable;

    public boolean getAllowRemove() throws Throwable;

    public boolean getIsSorted() throws Throwable;

    public boolean getSupportsChangeNotification() throws Throwable;

    public boolean getSupportsSearching() throws Throwable;

    public boolean getSupportsSorting() throws Throwable;

    public ListSortDirection getSortDirection() throws Throwable;

    public PropertyDescriptor getSortProperty() throws Throwable;



    // Instance Events section
    
    public void addListChanged(ListChangedEventHandler handler) throws Throwable;

    public void removeListChanged(ListChangedEventHandler handler) throws Throwable;


}