Created
May 8, 2015 15:43
-
-
Save micklaw/198864d9bc9087b3f755 to your computer and use it in GitHub Desktop.
Save new Examine Fields Event
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ExamineEvents_GatheringNodeData(object sender, IndexingNodeDataEventArgs e) | |
{ | |
// [ML] - Grab any properties that have been injected via IndexingNodeDataEventArgs 'node' and input them | |
if (e.IndexType == IndexTypes.Content) | |
{ | |
foreach (var node in e.Node.Elements()) | |
{ | |
if (!e.Fields.ContainsKey(node.Name.LocalName)) | |
{ | |
e.Fields.Add(node.Name.LocalName, node.Value); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment