Org.IdentityConnectors.Framework.Common.Objects.Schema.Schema C# (CSharp) Method

Schema() public method

Public only for serialization; please use SchemaBuilder instead.
public Schema ( ICollection info, ICollection options, IDictionary supportedObjectClassesByOperation, IDictionary supportedOptionsByOperation ) : System
info ICollection
options ICollection
supportedObjectClassesByOperation IDictionary
supportedOptionsByOperation IDictionary
return System
        public Schema(ICollection<ObjectClassInfo> info,
            ICollection<OperationOptionInfo> options,
            IDictionary<SafeType<APIOperation>, ICollection<ObjectClassInfo>> supportedObjectClassesByOperation,
            IDictionary<SafeType<APIOperation>, ICollection<OperationOptionInfo>> supportedOptionsByOperation)
        {
            _declaredObjectClasses = CollectionUtil.NewReadOnlySet<ObjectClassInfo>(info);
            _declaredOperationOptions = CollectionUtil.NewReadOnlySet(options);

            //make read-only
            {
                IDictionary<SafeType<APIOperation>, ICollection<ObjectClassInfo>> temp =
                    new Dictionary<SafeType<APIOperation>, ICollection<ObjectClassInfo>>();
                foreach (KeyValuePair<SafeType<APIOperation>, ICollection<ObjectClassInfo>> entry in
                    supportedObjectClassesByOperation)
                {
                    SafeType<APIOperation> op =
                        entry.Key;
                    ICollection<ObjectClassInfo> resolvedClasses =
                        CollectionUtil.NewReadOnlySet(entry.Value);
                    temp[op] = resolvedClasses;
                }
                _supportedObjectClassesByOperation = CollectionUtil.AsReadOnlyDictionary(temp);
            }
            //make read-only
            {
                IDictionary<SafeType<APIOperation>, ICollection<OperationOptionInfo>> temp =
                    new Dictionary<SafeType<APIOperation>, ICollection<OperationOptionInfo>>();
                foreach (KeyValuePair<SafeType<APIOperation>, ICollection<OperationOptionInfo>> entry in
                    supportedOptionsByOperation)
                {
                    SafeType<APIOperation> op =
                        entry.Key;
                    ICollection<OperationOptionInfo> resolvedClasses =
                        CollectionUtil.NewReadOnlySet(entry.Value);
                    temp[op] = resolvedClasses;
                }
                _supportedOptionsByOperation = CollectionUtil.AsReadOnlyDictionary(temp);
            }
        }