コード例 #1
0
 internal DocumentationFilterOptions(
     VisibilityFilter visibility                      = VisibilityFilter.All,
     SymbolGroupFilter symbolGroups                   = SymbolGroupFilter.TypeOrMember,
     IEnumerable <SymbolFilterRule> rules             = null,
     IEnumerable <AttributeFilterRule> attributeRules = null) : base(visibility, symbolGroups, rules, attributeRules)
 {
 }
コード例 #2
0
 internal void DrawBackground(Graphics g, VisibilityFilter Visibility, RectangleF area)
 {
     if (!File.Writable)
     {
         DrawReadOnly(g, area);
     }
 }
コード例 #3
0
 public override IEnumerable <Item> AllItems(VisibilityFilter filter)
 {
     if (m_filter(filter.Types) && Text.IndexOf(filter.Text.Value, StringComparison.CurrentCultureIgnoreCase) >= 0)
     {
         yield return(this);
     }
 }
コード例 #4
0
        public SpellingFixerOptions(
            SpellingScopeFilter scopeFilter   = SpellingScopeFilter.All,
            VisibilityFilter symbolVisibility = VisibilityFilter.All,
            SplitMode splitMode       = SplitMode.CaseAndHyphen,
            int minWordLength         = 3,
            int codeContext           = 1,
            bool includeGeneratedCode = false,
            bool autoFix     = true,
            bool interactive = false,
            bool dryRun      = false)
        {
            if (codeContext < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(codeContext), codeContext, "");
            }

            ScopeFilter          = scopeFilter;
            SymbolVisibility     = symbolVisibility;
            SplitMode            = splitMode;
            MinWordLength        = minWordLength;
            CodeContext          = codeContext;
            IncludeGeneratedCode = includeGeneratedCode;
            AutoFix     = autoFix;
            Interactive = interactive;
            DryRun      = dryRun;
        }
コード例 #5
0
 public static Action SetVisibility(VisibilityFilter filter)
 {
     return(new Action()
     {
         ActionType = ActionType.SET_VISIBILITY,
         Filter = filter,
     });
 }
コード例 #6
0
            public void Draw(Graphics g, VisibilityFilter filter, RectangleF area, IColorScheme scheme)
            {
                float indent        = CalculateIndent(area);
                var   iconRectangle = CalculateIconRectangle(area);

                DrawMinimizeIcon(g, MinimizedIconRectangle(area, indent), filter, scheme);
                DrawTree(g, iconRectangle, filter, scheme);
                DrawIcon(g, iconRectangle);
            }
コード例 #7
0
            public override void DrawTree(Graphics g, RectangleF iconRectangle, VisibilityFilter filter, IColorScheme scheme)
            {
                var   start       = iconRectangle.Center();
                float treeBranchX = start.X - ItemHeight + 6; //The x coordinate of the point where this node's connector line joins the parents branch line

                g.DrawLine(scheme.TreePen, start, new PointF(treeBranchX, start.Y));
                //g.DrawLine(ContainerItem.TreePen, treeBranchX, start.Y - HEIGHT, treeBranchX, start.Y + 1); //The +1 ensures the lines connect up nicely

                //start, new PointF(start.X, start.Y + HEIGHT * (itemsBeforeLastChild + 1)));
            }
コード例 #8
0
 internal SymbolFinderOptions(
     VisibilityFilter visibility                      = VisibilityFilter.All,
     SymbolGroupFilter symbolGroups                   = SymbolGroupFilter.TypeOrMember,
     IEnumerable <SymbolFilterRule> rules             = null,
     IEnumerable <AttributeFilterRule> attributeRules = null,
     bool ignoreGeneratedCode = false,
     bool unusedOnly          = false) : base(visibility, symbolGroups, rules, attributeRules)
 {
     IgnoreGeneratedCode = ignoreGeneratedCode;
     UnusedOnly          = unusedOnly;
 }
コード例 #9
0
ファイル: ContainerItem.cs プロジェクト: shaneasd/ConEdit
 public override IEnumerable <Item> Children(VisibilityFilter filter)
 {
     if (!Minimized.Value)
     {
         return(m_subItems.Where(a => a.AllItems(filter).Any())); //Filter out children that wont even report themselves as existing
     }
     else
     {
         return(Enumerable.Empty <Item>());
     }
 }
コード例 #10
0
ファイル: ContainerItem.cs プロジェクト: shaneasd/ConEdit
 public override IEnumerable <Item> AllItems(VisibilityFilter filter)
 {
     if (Children(filter).Any() || (filter.Types.EmptyFolders.Value && Text.IndexOf(filter.Text.Value, StringComparison.CurrentCultureIgnoreCase) >= 0))
     {
         return(AllItemsWithoutFilteringThis(filter));
     }
     else
     {
         return(Enumerable.Empty <Item>());
     }
 }
コード例 #11
0
ファイル: ContainerItem.cs プロジェクト: shaneasd/ConEdit
            /// <summary>
            /// Applies no filtering to this instance but still filters children
            /// </summary>
            protected IEnumerable <Item> AllItemsWithoutFilteringThis(VisibilityFilter filter)
            {
                yield return(this);

                foreach (var subitem in Children(filter))
                {
                    foreach (var subitemitem in subitem.AllItems(filter))
                    {
                        yield return(subitemitem);
                    }
                }
            }
コード例 #12
0
        internal SymbolFilterOptions(
            VisibilityFilter visibility = VisibilityFilter.All,
            SymbolGroupFilter symbolGroups = SymbolGroupFilter.TypeOrMember,
            IEnumerable<SymbolFilterRule> rules = null,
            IEnumerable<AttributeFilterRule> attributeRules = null)
        {
            Visibility = visibility;
            SymbolGroups = symbolGroups;

            Rules = rules?.ToImmutableArray() ?? ImmutableArray<SymbolFilterRule>.Empty;
            AttributeRules = attributeRules?.ToImmutableArray() ?? ImmutableArray<AttributeFilterRule>.Empty;
        }
コード例 #13
0
            public void DrawText(Arthur.NativeTextRenderer renderer, VisibilityFilter visibility, RectangleF area, IColorScheme scheme)
            {
                //g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
                //g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.None;

                if (m_textBox == null)
                {
                    float indent   = CalculateIndent(area);
                    var   textArea = CalculateTextArea(area, indent);
                    int   margin   = 4;
                    renderer.DrawString(Text, SystemFonts.MessageBoxFont, scheme.Foreground, textArea.Location.Plus(margin, margin).Round());
                }
            }
コード例 #14
0
ファイル: ContainerItem.cs プロジェクト: shaneasd/ConEdit
            public override void DrawTree(Graphics g, RectangleF iconRectangle, VisibilityFilter filter, IColorScheme scheme)
            {
                var start = iconRectangle.Center();

                float treeBranchX = start.X - ItemHeight + 6; //The x coordinate of the point where this node's connector line joins the parents branch line

                g.DrawLine(scheme.TreePen, start, new PointF(treeBranchX, start.Y));

                Func <Item, int> itemsBefore = (child) => Children(filter).TakeWhile(i => i != child).Select(c => c.AllItems(filter).Count()).Sum();

                //Draw vertical line
                if (Children(filter).Any())
                {
                    int itemsBeforeLastChild = itemsBefore(Children(filter).Last());
                    g.DrawLine(scheme.TreePen, start, new PointF(start.X, start.Y + ItemHeight * (itemsBeforeLastChild + 1) + 1));
                }
            }
コード例 #15
0
 internal SymbolRenamerOptions(
     RenameScopeFilter scopeFilter                     = RenameScopeFilter.All,
     VisibilityFilter visibilityFilter                 = VisibilityFilter.All,
     RenameErrorResolution errorResolution             = RenameErrorResolution.None,
     IEnumerable <string> ignoredCompilerDiagnosticIds = null,
     int codeContext           = -1,
     bool includeGeneratedCode = false,
     bool ask         = false,
     bool dryRun      = false,
     bool interactive = false)
 {
     ScopeFilter                  = scopeFilter;
     VisibilityFilter             = visibilityFilter;
     ErrorResolution              = errorResolution;
     IgnoredCompilerDiagnosticIds = ignoredCompilerDiagnosticIds?.ToImmutableHashSet() ?? ImmutableHashSet <string> .Empty;
     CodeContext                  = codeContext;
     IncludeGeneratedCode         = includeGeneratedCode;
     Ask         = ask;
     DryRun      = dryRun;
     Interactive = interactive;
 }
コード例 #16
0
                // -- Constructors --
                public State() {
                    resourceBE = ResourceBE.New(ResourceBE.Type.UNDEFINED);
                    resourceDeletionFilter = DeletionFilter.ANY;
                    revisionVisibilityFilter = VisibilityFilter.ANY;
                    resourceIds = null;
                    nameFilter = null;
                    parentIds = null;
                    parentType = ResourceBE.Type.UNDEFINED;
                    resourceTypes = null;
                    changeSetId = null;
                    changeType = ResourceBE.ChangeOperations.UNDEFINED;

                    populateResourceCountOnly = false;
                    populateContent = true;
                    populateRevisions = false;
                    populateChildResourcesForRev = false;
                    populateChildResources = false;
                    orderClauses = null;
                    limit = null;
                    offset = null;
                }
コード例 #17
0
 protected virtual void DrawMinimizeIcon(Graphics g, RectangleF minimizeIconRectangle, VisibilityFilter filter, IColorScheme scheme)
 {
 }
コード例 #18
0
 public abstract void DrawTree(Graphics g, RectangleF iconRectangle, VisibilityFilter filter, IColorScheme scheme);
コード例 #19
0
 public abstract IEnumerable <Item> AllItems(VisibilityFilter filter);
コード例 #20
0
ファイル: ContainerItem.cs プロジェクト: shaneasd/ConEdit
 protected override void DrawMinimizeIcon(Graphics g, RectangleF minimizeIconRectangle, VisibilityFilter filter, IColorScheme scheme)
 {
     if (m_subItems.Any(a => a.AllItems(filter).Any()))
     {
         g.FillRectangle(scheme.BackgroundBrush, minimizeIconRectangle);
         g.DrawRectangle(scheme.ForegroundPen, minimizeIconRectangle);
         g.DrawLine(scheme.ForegroundPen, new PointF(minimizeIconRectangle.Left + 2, minimizeIconRectangle.Y + minimizeIconRectangle.Height / 2), new PointF(minimizeIconRectangle.Right - 2, minimizeIconRectangle.Y + minimizeIconRectangle.Height / 2));
         if (Minimized.Value)
         {
             g.DrawLine(scheme.ForegroundPen, new PointF(minimizeIconRectangle.Left + minimizeIconRectangle.Width / 2, minimizeIconRectangle.Top + 2), new PointF(minimizeIconRectangle.Right - minimizeIconRectangle.Width / 2, minimizeIconRectangle.Bottom - 2));
         }
     }
 }
コード例 #21
0
 public abstract IEnumerable <Item> Children(VisibilityFilter filter);
コード例 #22
0
    void OnGUI()
    {
        var settingsSystem = World.DefaultGameObjectInjectionWorld.GetOrCreateSystem <OcclusionSettingsSystem>();

        GUILayout.Space(5);
        GUILayout.Label("Options", EditorStyles.boldLabel);

        settingsSystem.OcclusionEnabled         = GUILayout.Toggle(settingsSystem.OcclusionEnabled, "Enable Occlusion");
        settingsSystem.OcclusionParallelEnabled = GUILayout.Toggle(settingsSystem.OcclusionParallelEnabled, "Enable Parallel Work");

#if UNITY_MOC_NATIVE_AVAILABLE
        GUILayout.Label("Occlusion Mode:");
        if (GUILayout.Toggle(OcclusionSettingsSystem.MOCOcclusionMode.Intrinsic == settingsSystem.MocOcclusionMode, "MOC Burst Intrinsics"))
        {
            settingsSystem.MocOcclusionMode = OcclusionSettingsSystem.MOCOcclusionMode.Intrinsic;
        }

        if (GUILayout.Toggle(OcclusionSettingsSystem.MOCOcclusionMode.Native == settingsSystem.MocOcclusionMode, "MOC Native"))
        {
            settingsSystem.MocOcclusionMode = OcclusionSettingsSystem.MOCOcclusionMode.Native;
        }
#endif

        GUILayout.Space(20);
        GUILayout.Label("Tools", EditorStyles.boldLabel);
        GUILayout.Space(5);

        VisibilityFilter currentVis = _visibilityFilter;
        if (GUILayout.Toggle(_visibilityFilter == VisibilityFilter.Occluders, "Show Only Ocludders"))
        {
            var list = FindObjectsOfType <Occluder>().Select(x => x.gameObject).ToArray();
            ScriptableSingleton <SceneVisibilityManager> .instance.Isolate(list, true);

            _visibilityFilter = VisibilityFilter.Occluders;
        }
        else
        {
            if (_visibilityFilter == VisibilityFilter.Occluders)
            {
                ScriptableSingleton <SceneVisibilityManager> .instance.ExitIsolation();

                _visibilityFilter = VisibilityFilter.None;
            }
        }

        if (GUILayout.Toggle(_visibilityFilter == VisibilityFilter.Occludees, "Show Only Occludees"))
        {
            var list = FindObjectsOfType <Occludee>().Select(x => x.gameObject).ToArray();
            ScriptableSingleton <SceneVisibilityManager> .instance.Isolate(list, true);

            _visibilityFilter = VisibilityFilter.Occludees;
        }
        else
        {
            if (_visibilityFilter == VisibilityFilter.Occludees)
            {
                ScriptableSingleton <SceneVisibilityManager> .instance.ExitIsolation();

                _visibilityFilter = VisibilityFilter.None;
            }
        }

        if (GUILayout.Button("Select Ocludders"))
        {
            Selection.objects = FindObjectsOfType <Occluder>().Select(x => x.gameObject).ToArray();
        }

        if (GUILayout.Button("Select Ocluddees"))
        {
            Selection.objects = FindObjectsOfType <Occludee>().Select(x => x.gameObject).ToArray();
        }


        if (GUILayout.Button("Add Occluder Volumes to Selected"))
        {
            foreach (var selected in Selection.gameObjects)
            {
                Bounds bounds = new Bounds();
                foreach (Transform transform in selected.transform)
                {
                    if (transform.gameObject.GetComponent <MeshFilter>() != null)
                    {
                        Mesh mesh = transform.gameObject.GetComponent <MeshFilter>().mesh;
                        bounds.Encapsulate(mesh.bounds.min);
                        bounds.Encapsulate(mesh.bounds.max);
                    }
                }
                Occluder occluder = selected.AddComponent <Occluder>();
                occluder.Type = Occluder.OccluderType.Volume;
                OccluderVolume vol = new OccluderVolume();
                vol.CreateCube();
                occluder.Mesh = vol.CalculateMesh();

                occluder.relativePosition = bounds.center;
                Vector3 boundsScale;
                boundsScale.x          = (bounds.max.x - bounds.min.x);
                boundsScale.y          = (bounds.max.y - bounds.min.y);
                boundsScale.z          = (bounds.max.z - bounds.min.z);
                occluder.relativeScale = boundsScale;
                UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(selected.gameObject.scene);
            }
        }

        if (GUILayout.Button("Add Occludees to Selected"))
        {
            foreach (var go in Selection.gameObjects)
            {
                if (go.GetComponent <MeshRenderer>())
                {
                    if (!go.TryGetComponent <Occludee>(out var occludee))
                    {
                        go.AddComponent <Occludee>();
                        UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(go.scene);
                    }
                }
            }
        }

        if (GUILayout.Button("Add Occludees to All Mesh Renderers"))
        {
            foreach (var meshRender in FindObjectsOfType <MeshRenderer>())
            {
                var go = meshRender.gameObject;
                if (go.GetComponent <MeshRenderer>())
                {
                    if (!go.TryGetComponent <Occludee>(out var occludee))
                    {
                        go.AddComponent <Occludee>();
                    }
                }
            }
        }

        if (GUILayout.Button("Remove Occluders from Selected"))
        {
            foreach (var go in Selection.gameObjects)
            {
                foreach (var o in go.GetComponents <Occluder>())
                {
                    DestroyImmediate(o);
                }
            }
        }

        if (GUILayout.Button("Remove Occludees from Selected"))
        {
            foreach (var go in Selection.gameObjects)
            {
                foreach (var o in go.GetComponents <Occludee>())
                {
                    DestroyImmediate(o);
                }
            }
        }



        GUILayout.Space(20);
        GUILayout.Label("Debug Modes", EditorStyles.boldLabel);
        GUILayout.Space(5);

        var debugSystem = World.DefaultGameObjectInjectionWorld.GetOrCreateSystem <OcclusionDebugRenderSystem>();
        if (GUILayout.Toggle(OcclusionDebugRenderSystem.DebugRenderMode.None == debugSystem.m_DebugRenderMode, "Turn off Debug"))
        {
            debugSystem.m_DebugRenderMode = OcclusionDebugRenderSystem.DebugRenderMode.None;
        }

        if (GUILayout.Toggle(OcclusionDebugRenderSystem.DebugRenderMode.Depth == debugSystem.m_DebugRenderMode, "Show Depth Buffer"))
        {
            debugSystem.m_DebugRenderMode = OcclusionDebugRenderSystem.DebugRenderMode.Depth;
        }

        if (GUILayout.Toggle(OcclusionDebugRenderSystem.DebugRenderMode.Test == debugSystem.m_DebugRenderMode, "Show Depth Test"))
        {
            debugSystem.m_DebugRenderMode = OcclusionDebugRenderSystem.DebugRenderMode.Test;
        }

        if (OcclusionDebugRenderSystem.DebugRenderMode.Depth == debugSystem.m_DebugRenderMode || OcclusionDebugRenderSystem.DebugRenderMode.Test == debugSystem.m_DebugRenderMode)
        {
            debugSystem.WantedOcclusionDraw = EditorGUILayout.IntSlider(debugSystem.WantedOcclusionDraw, 1, debugSystem.TotalOcclusionDrawPerFrame);
        }


        if (GUILayout.Toggle(OcclusionDebugRenderSystem.DebugRenderMode.Mesh == debugSystem.m_DebugRenderMode, "Show Occluder Meshes"))
        {
            debugSystem.m_DebugRenderMode = OcclusionDebugRenderSystem.DebugRenderMode.Mesh;
        }

        if (GUILayout.Toggle(OcclusionDebugRenderSystem.DebugRenderMode.Bounds == debugSystem.m_DebugRenderMode, "Show Occludee Bounds"))
        {
            debugSystem.m_DebugRenderMode = OcclusionDebugRenderSystem.DebugRenderMode.Bounds;
        }


        settingsSystem.DisplayOccluded = GUILayout.Toggle(settingsSystem.DisplayOccluded, "Display Occluded");
    }
コード例 #23
0
ファイル: GameManager.cs プロジェクト: Lech-x/PhilosophemeRep
    public static bool CheckForLinearVisibility(GameObject go1, GameObject go2, float maxDistance, int layerMask, QueryTriggerInteraction q, VisibilityFilter f)
    {
        Vector3 pos1     = go1.transform.position;
        Vector3 pos2     = go2.transform.position;
        Vector3 dir      = pos2 - pos1;
        float   distance = dir.magnitude;

        if (distance > maxDistance)
        {
            return(false);
        }

        if (go2.name == "Eye1")
        {
            print("Eye1");
        }

        bool isVisible = true;

        RaycastHit[] hits = Physics.RaycastAll(pos1, dir, distance, layerMask, q);
        //Debug.DrawRay(pos1, dir.normalized * distance, Color.red, Time.deltaTime);
        if (hits.Length == 0)
        {
            return(true);
        }

        for (int i = 0; i < hits.Length; i++)
        {
            GameObject go = hits[i].collider.gameObject;
            if (
                go == go1 || go == go2 ||
                f != null && f.Invoke(go)
                )
            {
                continue;
            }
            isVisible = false;
            break;
        }
        return(isVisible);
    }
コード例 #24
0
        private IEnumerable <TodoItemViewModel> GetFilteredTodos(IReadOnlyDictionary <int, TodoItem> todos, IReadOnlyDictionary <int, TodoItem> editingTodos, VisibilityFilter filter)
        {
            IEnumerable <TodoItem> visibleTodos = Enumerable.Empty <TodoItem>();

            if (filter == VisibilityFilter.ShowAllItems)
            {
                visibleTodos = todos.Select(x => x.Value);
            }
            if (filter == VisibilityFilter.ShowCompletedItems)
            {
                visibleTodos = todos.Where(x => x.Value.Completed).Select(x => x.Value);
            }
            if (filter == VisibilityFilter.ShowActiveItems)
            {
                visibleTodos = todos.Where(x => !x.Value.Completed).Select(x => x.Value);
            }

            return(visibleTodos.Select(todo => new TodoItemViewModel()
            {
                Id = todo.Id,
                Text = todo.Text,
                TextEditor = todo.Text,
                IsCompleted = todo.Completed,
                TextEditorIsVisible = editingTodos.ContainsKey(todo.Id)
            }));
        }
コード例 #25
0
        private static void Main2(string[] args)
        {
            NLogConfigManager.CreateFileConfig();
            Logger = NLog.LogManager.GetCurrentClassLogger();

            if (args.Length != 1)
            {
                throw new InvalidUserParamsException(
                          "RandoopBare takes exactly one argument but was "
                          + "given the following arguments:"
                          + System.Environment.NewLine
                          + Util.PrintArray(args));;
            }

            // Parse XML file with generation parameters.
            string configFileName       = ConfigFileName.Parse(args[0]);
            RandoopConfiguration config = LoadConfigFile(configFileName);

            // Set the random number generator.
            if (config.randomSource == RandomSource.SystemRandom)
            {
                Logger.Debug("Randoom seed = " + config.randomseed);
                SystemRandom random = new SystemRandom();
                random.Init(config.randomseed);
                Enviroment.Random = random;
            }
            else
            {
                Util.Assert(config.randomSource == RandomSource.Crypto);
                Logger.Debug("Randoom seed = new System.Security.Cryptography.RNGCryptoServiceProvider()");
                Enviroment.Random = new CryptoRandom();
            }

            if (!Directory.Exists(config.outputdir))
            {
                throw new InvalidUserParamsException("output directory does not exist: "
                                                     + config.outputdir);
            }

            Collection <Assembly> assemblies = Misc.LoadAssemblies(config.assemblies);

            ////[email protected] for substituting MessageBox.Show() - start
            ////Instrument instrumentor = new Instrument();
            //foreach (FileName asm in config.assemblies)
            //{
            //    Instrument.MethodInstrument(asm.fileName, "System.Windows.Forms.MessageBox::Show", "System.Logger.Debug");
            //}
            ////[email protected] for substituting MessageBox.Show() - end

            IReflectionFilter filter1 = new VisibilityFilter(config);
            ConfigFilesFilter filter2 = new ConfigFilesFilter(config);

            Logger.Debug("========== REFLECTION PATTERNS:");
            filter2.PrintFilter(Console.Out);

            IReflectionFilter filter = new ComposableFilter(filter1, filter2);

            Collection <Type> typesToExplore = ReflectionUtils.GetExplorableTypes(assemblies);

            PlanManager planManager = new PlanManager(config);

            planManager.builderPlans.AddEnumConstantsToPlanDB(typesToExplore);
            planManager.builderPlans.AddConstantsToTDB(config);

            Logger.Debug("========== INITIAL PRIMITIVE VALUES:");
            planManager.builderPlans.PrintPrimitives(Console.Out);

            StatsManager stats = new StatsManager(config);

            Logger.Debug("Analyzing assembly.");

            ActionSet actions;

            try
            {
                actions = new ActionSet(typesToExplore, filter);
            }
            catch (EmpytActionSetException)
            {
                string msg = "After filtering based on configuration files, no remaining methods or constructors to explore.";
                throw new InvalidUserParamsException(msg);
            }

            Logger.Debug("Generating tests.");

            RandomExplorer explorer =
                new RandomExplorer(typesToExplore, filter, true, config.randomseed, config.arraymaxsize, stats, actions);
            ITimer t = new Timer(config.timelimit);

            try
            {
                explorer.Explore(t, planManager, config.methodweighing, config.forbidnull, true, config.fairOpt);
            }
            catch (Exception e)
            {
                Logger.Error("Explorer raised exception {0}", e.ToString());
                throw;
            }
        }
コード例 #26
0
 public override IEnumerable <Item> Children(VisibilityFilter filter)
 {
     return(Enumerable.Empty <Item>());
 }
コード例 #27
0
                public State(State s) {
                    resourceBE = ResourceBE.NewFrom(s.resourceBE);
                    resourceDeletionFilter = s.resourceDeletionFilter;
                    revisionVisibilityFilter = s.revisionVisibilityFilter;                    
                    populateContent = s.populateContent;
                    populateRevisions = s.populateRevisions;
                    populateChildResources = s.populateChildResources;
                    populateChildResourcesForRev = s.populateChildResourcesForRev;
                    populateResourceCountOnly = s.populateResourceCountOnly;
                    parentType = s.parentType;

                    if(!ArrayUtil.IsNullOrEmpty(s.resourceIds)) {
                        resourceIds = new List<uint>(s.resourceIds);
                    }

                    if(!ArrayUtil.IsNullOrEmpty(s.parentIds)) {
                        parentIds = new List<uint>(s.parentIds);
                    }

                    if(!ArrayUtil.IsNullOrEmpty(s.resourceTypes)) {
                        resourceTypes = new List<ResourceBE.Type>(s.resourceTypes);
                    }

                    if(!ArrayUtil.IsNullOrEmpty(s.nameFilter)) {
                        nameFilter = new List<string>(s.nameFilter);
                    }

                    if(!ArrayUtil.IsNullOrEmpty(s.orderClauses)) {
                        orderClauses = (ResourceOrderClause[]) s.orderClauses.Clone();
                    }

                    if(!ArrayUtil.IsNullOrEmpty(s.changeSetId)) {
                        changeSetId = new List<uint>(s.changeSetId).ToArray();
                    }

                    changeType = s.changeType;
                    limit = s.limit;
                    offset = s.offset;
                }
コード例 #28
0
 /// <summary>
 /// Create new instance of ChangeVisibilityFilter action.
 /// </summary>
 /// <param name="visibilityFilter">Visibility fiter to apply.</param>
 public ChangeVisibilityFilter(VisibilityFilter visibilityFilter)
 {
     Payload = visibilityFilter;
 }
コード例 #29
0
 public static TodoState SetVisibility(TodoState state, VisibilityFilter filter)
 {
     state.Filter = filter;
     state.SetStateChanged();
     return(state);
 }
コード例 #30
0
 /// <summary>
 /// Create an instance of TodoList
 /// </summary>
 /// <param name="todos">All available todo items.</param>
 /// <param name="editingTodos">Todos that are being currently edited.</param>
 /// <param name="filter">Filter which todo items should be visible.</param>
 public TodoList(IReadOnlyDictionary <int, TodoItem> todos, IReadOnlyDictionary <int, TodoItem> editingTodos, VisibilityFilter filter)
 {
     Todos        = todos;
     EditingTodos = editingTodos;
     Filter       = filter;
 }
コード例 #31
0
 public override IEnumerable <Item> AllItems(VisibilityFilter filter)
 {
     return(Enumerable.Empty <Item>());
 }
コード例 #32
0
 public UpdateFilterAction(VisibilityFilter visibilityFilter)
 {
     NewFileter = visibilityFilter;
 }